摘要: 当在一个controller中 通过设置$scope的数据,来影响其它control的范围时,可以使用$rootScope 举个例子: 在一个control A范围内设置 mainApp.controller('menuController', function($scope,$rootScope) 阅读全文
posted @ 2016-11-05 12:07 51kata 阅读(361) 评论(0) 推荐(0) 编辑
摘要: 当使用bootstrap的如下input时 <input type="email" ng-model="userid"> 如果输入的内容是无效的email格式,这时 ng-model 将无效。但当输入的格式有效时,则ng-model 有效。 如果是<input type="text"> ,则没有这种 阅读全文
posted @ 2016-11-05 11:58 51kata 阅读(878) 评论(0) 推荐(0) 编辑