ducky_L

导航

随笔分类 -  Me & AngularJs1.0

对AngularJS1.0版本的使用记录
5、AngularJS 直接绑定显示html ($sce、$sanitize服务)
摘要:1、直接使用$sce服务(angularjs中:$sce.trustAsHtml($scope.snippet)。html:ng-bind-html="snippet") 以下代码输出: 2、使用angular-sanitize.js 模块中的$sanitize服务,信任字符串,直接显示html 以 阅读全文

posted @ 2018-03-02 12:18 ducky_L 阅读(239) 评论(0) 推荐(0)

3、调试AngularJs
摘要:1、获取Angular元素: angular.element(document.querySelector('html')); a、ele.scope() 提取它的$scope对象 b、ele.controller() 提取它的控制器 c、ele.injector() 提取它的注入器 d、ele.i 阅读全文

posted @ 2017-06-28 23:46 ducky_L 阅读(198) 评论(0) 推荐(0)

2、AngularJs 过滤器($filter)
摘要:1、内置过滤器: currency ({{123|currency}}) date (medium\short\fullDate\longDate\mediumDate\shortDate\mediumTime\shortTime) {{today | date:'medium'}} <!--Jun 阅读全文

posted @ 2017-06-26 21:12 ducky_L 阅读(230) 评论(0) 推荐(0)