如果本文对您有帮助,希望点个赞,建立下友谊关系。
摘要: 1. *ngFor相当于angularJS的ng-repeat。 2. @input是通过某种方式把父模板数据传给子组件 3. 在Angular中,添加一个带方括号的属性(比如[name])意味着把一个值传给该组件上同名的输入属性(比如name) 4. @NgModule注解有三个属性:declar 阅读全文
posted @ 2017-11-21 10:02 一只喵喵 阅读(115) 评论(0) 推荐(0) 编辑
摘要: <script src="http://cdn.static.runoob.com/libs/angular.js/1.4.6/angular.min.js"></script> <script src="//cdn.bootcss.com/angular-websocket/2.0.1/angul 阅读全文
posted @ 2017-09-07 14:13 一只喵喵 阅读(1228) 评论(0) 推荐(0) 编辑
摘要: angularjs 使用ui.router 去掉url中的#号。只要在index.html中添加<base href="/工程名/" /> 在路由中config下注入:locationProvider 然后添加 $locationProvider.html5Mode(true);就可以了 阅读全文
posted @ 2017-09-07 13:52 一只喵喵 阅读(627) 评论(0) 推荐(0) 编辑
摘要: 然后再模块中注入‘'custom-template’; 打开该模块的方法: 关闭该模态框同时带参过来: 在其他控制器调用该确认框:(首先注入Common) 完成确认框之后会发现确认框在顶部,然后修改全局的css的'.model'样式,所有模态框都垂直居中了,如下: .modal { position 阅读全文
posted @ 2017-09-07 10:34 一只喵喵 阅读(2357) 评论(0) 推荐(0) 编辑
摘要: html部分: <div class="loading" ng-show="loading"> <div class="tishi"> <strong><i class="fa fa-spin fa-spinner fa-lg"></i></strong> </div></div> css部分: . 阅读全文
posted @ 2017-09-07 10:19 一只喵喵 阅读(279) 评论(0) 推荐(0) 编辑
摘要: angular学习笔记02 angular指令大全 <input ng-keyup="event=$event">//<p>event keyCode: {{ event.keyCode }}</p>//<p>event altKey: {{ event.shiftKey }}</p> myApp. 阅读全文
posted @ 2017-09-01 13:27 一只喵喵 阅读(535) 评论(0) 推荐(0) 编辑
摘要: html部分: <div ng-init="app.avatar = '/fileRecord/file/show' + '?userId=' + app.user.id"> <img ng-src="{{app.avatar + '&' +time}}" class="img-full" alt= 阅读全文
posted @ 2017-08-30 16:38 一只喵喵 阅读(961) 评论(0) 推荐(0) 编辑
摘要: 1、json数据为: data.textfield = "[{"TFC":"@CSS","TFM":"css"},{"TFC":"@Body","TFM":"body"},{"TFC":"@Script","TFM":"script"}]"; 将它转换成数组就是:var textfield = JS 阅读全文
posted @ 2017-07-13 15:00 一只喵喵 阅读(1905) 评论(0) 推荐(0) 编辑
摘要: 代码当中的{0}和{1}就是占位符,分别给config.server和data.id占位 阅读全文
posted @ 2017-05-16 12:06 一只喵喵 阅读(167) 评论(0) 推荐(0) 编辑