
AngularJS
tina_tian1
行到水穷处,坐看云起时
展开
-
AngularJs 上传文件
HTML: upload me 以上方式不可自动把文件同file-model关联, 也就是myFile始终是未定义的。 可以通过一下方式改善: onFileSelect($files)" type="file" accept=".csv" > upload me controller: $scope.onFileSelect原创 2016-08-30 13:38:57 · 4756 阅读 · 0 评论 -
AngularJs 自定义filter
HTML: {{test.password | pwdFormat}} JS: angular.module('test-app').filter("pwdFormat",function(){ return function(value){ if(value){ return value.repla原创 2016-09-19 16:30:16 · 396 阅读 · 0 评论 -
Node.js hello world
1. Node.js + angularJS on Windows https://github.com/tianxia1221/nodeAngularHelloWorld 2. Node.js + mySQL on Windows https://github.com/tianxia1221/nodeMysqlHelloWorld原创 2016-09-23 14:14:35 · 280 阅读 · 0 评论 -
AngularJs Model-View绑定
Dirty Checking AngularJS内部比较value现在的值和之前的值,如果发生了改变,就触发change事件。 Digest 执行Dirty Checking的机制,由$digest()触发。 是AngularJS的心跳, 50ms跳动一次 PS:任何比50ms还快的变化都是不可被察觉的~ Apply 当dom事件原创 2016-09-21 15:30:10 · 757 阅读 · 0 评论 -
AngularJs Provider
provider, value, constant, service, factory他们都是provider! eg: $http AngularJs框架提供的provider 1. 为应用提供通用的服务,形式可以是常量或对象 2. 便于模块化 3. 便于单元测试 function provider(name, provider_) { if (isFu原创 2016-09-21 15:54:48 · 459 阅读 · 0 评论 -
AngularJS Basic笔记
1. Data Binding var myApp = angular.module('myApp',[]); myApp.controller('DoubleController', ['$scope', function($scope) { $scope.double = function(value) { return value * 2; }; }]); div ng-con原创 2016-11-15 17:46:35 · 243 阅读 · 0 评论