1、指令的名稱要統一小寫。
2、指令中require後的字符前面加^(shift+6)或?效果一樣。
3、$rootScope中的S大寫。
4、input是用於用戶輸入的,數據要從View傳輸到Controller中,而{{}}和ng-bind是用於從controller中得到數據然後顯示在view中。
5、ng-show,ng-model中的數據不能加$scope。
6、ng-required,true的時候驗證,false的時候不驗證,ng-show無法影響他的驗證。
7、
<label ng-repeat="option in result.sercice"> <input type="radio" ng-model="params.service" ng-value="option[0]">{{ option[1] }} </label>
ng-value在使用radio類型的input時是必不可少的,儘量使用ng-value而不是value。