嗨我按照jonhpapa规则使用
angularjs(1.5.0)开发应用程序.
我也使用角度材料1.0.6.
我也使用角度材料1.0.6.
我添加模块’ngMessages’时遇到问题.
我安装了lib angular-messages 1.5.1.
Error: [$compile:ctreq] Controller 'ngMessages',required by directive 'ngMessage',can't be found! http://errors.angularjs.org/1.5.0/$compile/ctreq?p0=ngMessages&p1=ngMessage at http://localhost:3000/bower_components/angular/angular.js:68:12 at getControllers (http://localhost:3000/bower_components/angular/angular.js:8817:19) at nodeLinkFn (http://localhost:3000/bower_components/angular/angular.js:8982:33) at compositeLinkFn (http://localhost:3000/bower_components/angular/angular.js:8226:13) at nodeLinkFn (http://localhost:3000/bower_components/angular/angular.js:8973:24) at compositeLinkFn (http://localhost:3000/bower_components/angular/angular.js:8226:13) at compositeLinkFn (http://localhost:3000/bower_components/angular/angular.js:8229:13) at compositeLinkFn (http://localhost:3000/bower_components/angular/angular.js:8229:13) at compositeLinkFn (http://localhost:3000/bower_components/angular/angular.js:8229:13) at compositeLinkFn (http://localhost:3000/bower_components/angular/angular.js:8229:13) <div data-ui-view="" class="ng-scope">
此时此视图没有控制器.该视图包含:
<md-input-container> <label>First name</label> <input name="firstName" ng-model="vm.user.firstName" md-maxlength="30" required> <div ng-messages="vm.user.firstName.$error"> <div ng-message="md-maxlength">Field has to be less than 30 characters long.</div> <div ng-message="required">Field required</div> </div> </md-input-container>
在此先感谢,问候.