随笔分类 - AngularJS
摘要:For the $watch in last article, we watch 'user.password', actually it is a string.If you watch 'user', this object and we do something like:function W...
阅读全文
posted @ 2014-11-13 07:25
Zhentiw
摘要:/** * Created by Answer1215 on 11/13/2014. */function MainCtrl($scope){ function isLongEnough (pwd) { return pwd.length > 4; } functio...
阅读全文
posted @ 2014-11-13 07:19
Zhentiw
摘要:There are two ways to naviagting between state: 1. Using $state service, $state.go() 2. Using ui-serf diretive $state.go Inject $state service. .contr
阅读全文
posted @ 2014-11-09 21:41
Zhentiw
摘要:AngularJS 1.3 add $submitted for form, so you can use $submitted to track whether the submit event is trggered.Read More:https://egghead.io/lessons/an...
阅读全文
posted @ 2014-11-09 01:37
Zhentiw
摘要:Read More:http://www.linkplugapp.com/a/953215https://docs.google.com/document/d/1XXMvReO8-Awi1EZXAXS4PzDzdNvV6pGcuaF4Q9821Es/pubangular-hinthelps us w...
阅读全文
posted @ 2014-11-08 23:41
Zhentiw
摘要:Note: Can use $dirty to check whether user has intracted with the form:https://docs.angularjs.org/api/ng/type/form.FormControllerRead More:http://www....
阅读全文
posted @ 2014-11-02 00:18
Zhentiw
摘要:ng-Message in {{vm.angularVersion}}Reused and override This email is required This is very easy to reuse and override the ng...
阅读全文
posted @ 2014-10-28 21:46
Zhentiw
摘要:ng-Message in {{vm.angularVersion}}DEMO Single message This field is required The lenght should at least 5 This s...
阅读全文
posted @ 2014-10-28 21:33
Zhentiw
摘要:Read More:https://egghead.io/lessons/angularjs-lazy-loading-modules-with-ui-router-and-oclazyloadUi Router:https://github.com/angular-ui/ui-routerUi R...
阅读全文
posted @ 2014-10-21 05:26
Zhentiw
摘要:Set up server for JWT Authentication 1. require express 2. require faker: If faker is not install yet, do: npm install express faker // faker is what
阅读全文
posted @ 2014-10-15 22:32
Zhentiw
摘要:Theangular-localforagelibrary makes simple offline storage easy.Once you refresh page, the content use put into localforage still exists. F...
阅读全文
posted @ 2014-10-13 17:09
Zhentiw
摘要:Read More:http://jsbin.com/dijeno/9/editSyntax: {{::person.name}}AngularJS's two-way binding is one of the "killer features" of the framework. The pro...
阅读全文
posted @ 2014-10-07 05:13
Zhentiw
摘要:Egghead Videos {{random}} {{random}}var app = angular.module('app', []);app.run(function($rootScope){ $rootScope.random = Math.rando...
阅读全文
posted @ 2014-10-04 21:19
Zhentiw
摘要:$scope.$watchNo matter the val changeprogrammatically or munally, it will fire the binded function.With AngularJS's $scope.$watch, you are able to mon...
阅读全文
posted @ 2014-09-30 01:06
Zhentiw
摘要:1. Clone the angular-seed from git.git clone https://github.com/angular/angular-seed.git2. cd to the angular-seed and type:npm install3. type npm star...
阅读全文
posted @ 2014-09-19 20:54
Zhentiw
摘要:Read More:1. https://egghead.io/lessons/angularjs-file-uploads2. https://github.com/danialfarid/angular-file-uploadCan just use npm to install the pac...
阅读全文
posted @ 2014-09-15 02:48
Zhentiw
摘要:When you want to show both the data and the struatrue:You can create a debug directive: terminal: true --- This means other somthings will be stops. ...
阅读全文
posted @ 2014-09-15 01:01
Zhentiw
摘要:The returned resource object has action methods which provide high-level behaviors without the need to interact with the low level$httpservice.也就是说当用用...
阅读全文
posted @ 2014-09-13 14:35
Zhentiw
摘要:digest only work on the current scope, has no affect on the parent scope!apply works for all the parents scope and current scope!So, if you click dige...
阅读全文
posted @ 2014-09-06 22:13
Zhentiw
摘要:transform is used to format json or whatever return from the server.Usage:Profile.factories = angular.module("profileFactories", []);Profile.factories...
阅读全文
posted @ 2014-09-06 17:51
Zhentiw