Category Archives: Angular.js

some tricky in ng-repeat update model in ionic

ng-repeat is to loop thought object list and auto generated html. for example in controller, we declare $scope.workspaces. Now $scope.workspaces = getDataFromDatabase(); 1 2 3 <li class="workspace-object" ng-repeat="w in workspaces | filter:searchQuery" ng-click="selectWorkspace(w)"> <a href="" class="workspace-link">{{w.name | titleCase }}</a> </li><li … Continue reading

Posted in Angular.js | Comments Off on some tricky in ng-repeat update model in ionic

Angular.js compile document to tree struction

the first step of angular.js is to compile document to element and childnode. this struction is similar with DOM. module is key concept of angular.js. what is angular.js module. A module is a collection of services, directives, controllers, filters, and … Continue reading

Posted in Angular.js | Comments Off on Angular.js compile document to tree struction

Angular.js – angularInit(..) and forEach

This is first post about Angular.js source code analysis. Angular.js start with following code. 1 2 3 4 5 bindJQuery(); publishExternalAPI(angular); jqLite(document).ready(function() { angularInit(document, bootstrap); }); bindJQuery(); publishExternalAPI(angular); jqLite(document).ready(function() { angularInit(document, bootstrap); }); Before it starts, it will go though … Continue reading

Posted in Angular.js | Comments Off on Angular.js – angularInit(..) and forEach