angularjs
文章平均质量分 54
信念堤岸
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
Angularjs 的过滤器使用小结
10.5. AngularJS 过滤器 过滤器可以使用一个管道字符(|)添加到表达式和指令中 AngularJS 过滤器可用于转换数据: 10.5.1. currency 格式化数字为货币格式。 数量: 价格: 总价 = {{ (quantity * price) | currency }} var app = angular.module('my原创 2017-04-27 15:53:00 · 1040 阅读 · 0 评论 -
angularjs 的指令 和 事件 的小结
一直在看angularjs的教程,因为常用到指令与事件,就把他们写下来了,方便自己以后来查询。 AngularJS 指令 本教程用到的 AngularJS 指令 : 指令 描述 ng-app 定义应用程序的根元素。 ng-bind 绑定 HTML 元素到应用程序数据 ng-bind-html 绑转载 2017-04-27 17:40:47 · 561 阅读 · 0 评论 -
angularjs的$index序号
angularjs的$index序号, 做新闻或列表时常用到 1.需要将数据按序号排列时,则用到 $index 2.去掉最后一行的border底线,用到: ng-class="{'sp-noLine':'{{$index}}'==ctl.GongZuoDT.length-1}" ,就是判断$indx是否长度-1,因为$index是从0开始计数的原创 2017-07-18 09:21:05 · 7655 阅读 · 0 评论 -
angularjs的 $http 服务
$http 服务, 是 AngularJS 中的一个核心服务,用于读取远程服务器的数据。 服务向服务器发送请求,应用响应服务器传送过来的数据。 app.controller('myCtrl', function($scope, $http) { $http.get("welcome.htm").then(function (response) { $scope.my原创 2017-05-03 09:04:29 · 382 阅读 · 0 评论 -
angularjs 页面跳转
angularjs 页面跳转,对于click事件触发页面跳转,这样比用ui-uref好控制里面写业务操作。 之前一直用a标签的跳转,但是,现在遇到需要点击按钮然后提示信息后,在触发跳转页面,只能用这种方式。 1.angularjs部分 //定义一个模块 'use strict'; var app = angular.module('app', [ ]);原创 2017-03-31 14:46:01 · 5908 阅读 · 0 评论 -
Angularjs中使用指令绑定点击事件的方法
原文地址:http://www.jb51.net/article/110020.htm 项目中,模板中的菜单是jQuery控制的,在Angularjs中就运行不到了,因为菜单项是ng-repeat之后的。 如html <a href="javascript:;" rel="external nofollow" rel="external nofollow" rel=转载 2017-04-12 14:06:37 · 1635 阅读 · 0 评论 -
angularjs ng-click 传参数
1.html 删除 2.js var self = this; self.deleteWorksheet = function (str) { var getID = str; alert(getID); }原创 2017-04-14 11:06:46 · 4395 阅读 · 0 评论 -
angularjs ng-show的用法
4. ng-show 判断 安 装原创 2017-04-14 11:13:29 · 3202 阅读 · 0 评论 -
angularjs 服务
AngularJS 服务(Service) AngularJS 内建了30 多个服务 10.6.1. $location 服务, 它可以返回当前页面的 URL 地址。 app.controller('customersCtrl', function($scope, $location) { $scope.myUrl = $location.absUrl(); }); 10.6.原创 2017-05-02 13:29:43 · 372 阅读 · 0 评论 -
angularjs的延迟服务 $timeout
$timeout 服务, AngularJS $timeout 服务对应了 JS window.setTimeout 函数。 app.controller('myCtrl', function($scope, $timeout) { $scope.myHeader = "Hello World!"; $timeout(function () { $sco原创 2017-05-02 13:38:39 · 7681 阅读 · 0 评论 -
angularjs的实时调用服务 $interval
$interval 服务 AngularJS $interval 服务对应了 JS window.setInterval 函数。 app.controller('myCtrl', function($scope, $interval) { $scope.theTime = new Date().toLocaleTimeString(); $interval(funct原创 2017-05-02 13:39:26 · 573 阅读 · 0 评论 -
angularjs 自定义服务
创建自定义服务 你可以创建访问自定义服务,链接到你的模块中: 创建名为hexafy 的访问: app.service('hexafy', function() { this.myFunc = function (x) { return x.toString(16); } }); 使用自定义的的服务 hexafy 将一个数字转换为16进制数: a原创 2017-05-02 13:39:52 · 331 阅读 · 0 评论 -
angularjs常用实例
1、uppercase,lowercase 大小写转换 {{ "lower cap string" | uppercase }} // 结果:LOWER CAP STRING {{ "TANK is GOOD" | lowercase }} // 结果:tank is good 2、date 格式化 {{1490161945000 | date:"yyyy原创 2017-05-02 14:01:05 · 705 阅读 · 0 评论 -
angularjs的 $location 服务
$location 服务, 它可以返回当前页面的 URL 地址。 app.controller('customersCtrl', function($scope, $location) { $scope.myUrl = $location.absUrl(); });原创 2017-05-03 09:00:59 · 357 阅读 · 0 评论
分享