随笔分类 -  AnjularJS

1
摘要:https://zhongsp.gitbooks.io/typescript-handbook/content/index.html 阅读全文
posted @ 2016-08-10 11:04 garsonguo 阅读(270) 评论(0) 推荐(0) 编辑
摘要:AngularJS 提供了很好的 $cookie 和 $cookieStore API 用来处理 cookies 。这两个服务都能够很好的发挥HTML5 cookies,当HTML5 API可用时浏览器会选择使用HTML5提供的API,如果不可用则默认选择document.cookies。无论那种方 阅读全文
posted @ 2016-07-05 21:05 garsonguo 阅读(385) 评论(0) 推荐(0) 编辑
摘要:1.ng-router: 获取路由参数(冒号后面的参数):$routeParams.casenumber 2.请求服务get请求:$http({ method: 'get', url: 'http://camnpr.com/getAPI/', params:{id: 1}, headers: {"C 阅读全文
posted @ 2016-07-05 21:03 garsonguo 阅读(334) 评论(0) 推荐(0) 编辑
摘要:1、常用指令 ng-class、ng-show、ng-disabled、ng-if、ng-hide加载页面时赋值(重点:ng-class的css赋值操作)$scope.clickValue = '受理';$scope.clickValue1='登记';$scope.IsDisable=true; 2 阅读全文
posted @ 2016-07-03 15:00 garsonguo 阅读(5763) 评论(0) 推荐(0) 编辑
摘要:开发中有时候会需要控制器之间的传值操作:下面几个操作可以达到所需, 注:无平级之间的操作 $emit只能向父 controller传递event与data$broadcast只能向子 controller传递event与data$on用于接收event与data 阅读全文
posted @ 2016-07-03 14:48 garsonguo 阅读(199) 评论(0) 推荐(0) 编辑
摘要:静态页面: controllers中的方法: 模态框所需控制器,其中items即为TQZJDFG()方法中传递过来的data: 创建可拖动指令见:http://www.cnblogs.com/bobo-show/p/5106204.html 阅读全文
posted @ 2016-07-03 14:45 garsonguo 阅读(618) 评论(0) 推荐(0) 编辑
摘要:html页面: 过滤器: html页面所需的控制器: 阅读全文
posted @ 2016-07-03 14:39 garsonguo 阅读(185) 评论(0) 推荐(0) 编辑
摘要:常用的表单验证1.必须字段html5特性 增加required 2.最小长度和最大长度 3.模式匹配——正则表达式 4.邮件模式 将type设置为email 5.数字 将type设置为number 6.url 将type设置为url 不常用(以下属性在form表单中) 1.屏蔽对表单的验证noval 阅读全文
posted @ 2016-07-01 13:35 garsonguo 阅读(210) 评论(0) 推荐(0) 编辑
摘要:所用插件:angular-file-upload 这个插件用到的几个指令:nv-file-select(点击选择)、uploader(用于绑定控制器中新建的uploader对象) HTML: 控制器文件: accept取值类型列表: 阅读全文
posted @ 2016-05-09 18:16 garsonguo 阅读(477) 评论(0) 推荐(0) 编辑
摘要:ng.module('index-filters', []).filter('trustHtml', function ($sce) { return function (input) { return $sce.trustAsHtml(input... 阅读全文
posted @ 2016-01-20 11:33 garsonguo 阅读(996) 评论(0) 推荐(0) 编辑
摘要:页面: {{item.imageLength/1024 | number:0}}KB{{item.imageName}} 下载 --> {... 阅读全文
posted @ 2016-01-13 11:46 garsonguo 阅读(853) 评论(0) 推荐(0) 编辑
摘要:读取文件夹下的文件public string ReadImagesPaths() { string result = string.Empty; try { string path = ... 阅读全文
posted @ 2016-01-12 18:34 garsonguo 阅读(728) 评论(0) 推荐(0) 编辑
摘要:define(['modules/tdpic-module', 'services/news-service', 'utilities/cryto'], function (app) { 'use strict'; app.controller('tdpic-controller', [... 阅读全文
posted @ 2016-01-08 14:07 garsonguo 阅读(2521) 评论(0) 推荐(0) 编辑
摘要://最近项目中需要将angular-ui-bootstrap中用到的弹出框,使之可拖动,由于源文件中没有实现,需要自己实现指令,以下即为该指令,亲测可以实现。.directive('draggable', ['$document', function($document) { ... 阅读全文
posted @ 2016-01-06 17:14 garsonguo 阅读(3375) 评论(8) 推荐(1) 编辑
摘要:做项目需要一个slider控件,找了很久没有找到合适的指令集,无意间看到可以直接用range替代,不过样式有点丑。 其中step指拉动的时候一次多大范围。 阅读全文
posted @ 2015-12-23 13:39 garsonguo 阅读(239) 评论(0) 推荐(0) 编辑
摘要:1.目录2.首页login.html如下: 登录界面 用户登录 用户名 ... 阅读全文
posted @ 2015-12-18 11:46 garsonguo 阅读(364) 评论(0) 推荐(0) 编辑
摘要:ng-view通过使用路由控制,可以方便的实现页面组合,但一个html文件中,只能有一个ng-view,他是可以被ctl控制的。ng-include就是将多个页面的公共页面提取出来,如header.html,footer.html等,在每个页面用来引入。 阅读全文
posted @ 2015-12-17 13:50 garsonguo 阅读(586) 评论(0) 推荐(0) 编辑
摘要:当使用ng-if时,是会把默认作用域删除的,当其为true时,只是增加了其界面元素,为最原始状态,控制器在其上是不起作用的,要想获取ng-if中的值,可以用$scope.$$childTail.layername。 *名称: 阅读全文
posted @ 2015-12-17 13:14 garsonguo 阅读(527) 评论(0) 推荐(0) 编辑
摘要:最近公司在用Express+angularjs+wcf开发系统,让我在windows上部署系统,遇到不少问题,不过最后还是解决了,在IIS上部署系统,首先windows需安装以下软件:1.nodejs;2.iisnode;3.rewrite;安装这三个软件后,之后部署和部署asp.net程序一样,这... 阅读全文
posted @ 2015-11-28 15:35 garsonguo 阅读(1362) 评论(0) 推荐(0) 编辑
摘要:技术构架:服务端技术:NodeJS + Express4.x + Mongodb + Mongoose前端技术: AngularJS1.2.x + Bootstrap3.x源码:https://github.com/angular-cn/ng-nice 阅读全文
posted @ 2015-11-28 10:16 garsonguo 阅读(186) 评论(0) 推荐(0) 编辑

1
点击右上角即可分享
微信分享提示