angular经验
2016-07-05 00:00
127 查看
##绑定的变量和方法失效
原因:html里面元素没有配对闭合,导致无法识别
###广播事件
整个 AngularJS框架,只有三个事件被发射 ($includeContentRequested, $includeContentLoaded, $viewContentLoaded), 和7个事件被传播 ($locationChangeStart, $locationChangeSuccess, $routeUpdate, $routeChangeStart, $routeChangeSuccess, $routeChangeError, $destroy).
####$locationChangeStart
路由变换前事件
####$locationChangeSuccess
路由变换成功后事件
####$viewContentLoaded
fired once the view is loaded, after the DOM is rendered. The '$scope' of the view emits the event."
###TypeError: 'scopeName' 为空或不是对象<div class=ng-scope ui-view>
原因是view的html语法错误。tr被div包裹了,删除div即可
###Unknown provider: tProvider <- t
一般是controller,service,directive等引入其他service时未声明。
错误:.directive('datePicker',function($timeout){
正确方法.directive('datePicker',['$timeout',function($timeout){
##html安全处理
http://www.mamicode.com/info-detail-322397.html
原因:html里面元素没有配对闭合,导致无法识别
###广播事件
整个 AngularJS框架,只有三个事件被发射 ($includeContentRequested, $includeContentLoaded, $viewContentLoaded), 和7个事件被传播 ($locationChangeStart, $locationChangeSuccess, $routeUpdate, $routeChangeStart, $routeChangeSuccess, $routeChangeError, $destroy).
####$locationChangeStart
路由变换前事件
####$locationChangeSuccess
路由变换成功后事件
####$viewContentLoaded
fired once the view is loaded, after the DOM is rendered. The '$scope' of the view emits the event."
###TypeError: 'scopeName' 为空或不是对象<div class=ng-scope ui-view>
原因是view的html语法错误。tr被div包裹了,删除div即可
###Unknown provider: tProvider <- t
一般是controller,service,directive等引入其他service时未声明。
错误:.directive('datePicker',function($timeout){
正确方法.directive('datePicker',['$timeout',function($timeout){
##html安全处理
http://www.mamicode.com/info-detail-322397.html
相关文章推荐
- angular的$watch 和$timeout
- Rename Filenames Wirth Full Angular-Chinese
- Angular1.3.X中embed标签使用ng-src的bug
- angularjs页面带参跳转以及参数解析
- angularjs单一页面内设置跳转路由
- angularJS-通过provider实现全局变量的读取和赋值
- AngularJS模块加载
- Angularjs中link函数参数含义小节
- AngularJS学习环境配置
- 浅谈AngularJS中的$parse和$eval
- Angularjs link和compile使用区别
- AngularJS入门教程:导言和准备
- AngularJS执行流程详解
- AngularJs 自定义指令
- [AngularJS面面观] 9. scope事件机制 - 基本概念以及生命周期
- [AngularJS面面观] 8. scope继承 - 属性覆盖,隔离scope以及指定scope的parent
- 从浅入深剖析angular表单验证
- Angularjs总结(五)指令运用及常用控件的赋值操作
- AngularJS浏览缩放图片
- Angularjs总结(四)$on、$emit和$broadcast的使用