随笔分类 - AngularJS
摘要:In Angular 1.5 introduces "compoment" syntax. But ng-annotate doesn't understand ".compoment" syntax, that's why in min version, the code doesn't work
阅读全文
摘要:When use 'require', recommend to add some error check, for example: We add a if() to check whether this is parent controller, if it is then we continu
阅读全文
摘要:Often buttons need to be handled by JavaScript, and if done improperly it can lead to accessibility issues. In this lesson you will improve a major ne
阅读全文
摘要:Let's say we want a parent state which is a abstract state. Two children states, one is for sinlge account view and another is for multi-accounts view
阅读全文
摘要:We're going to use rootScope emit here to send out events and then we're going to listen for them in the run block. We're going to use rootScope on do
阅读全文
摘要:Download from npm: https://www.npmjs.com/package/angular-md-table +: Responsive: Has both Mobile view and Desktop view i18n: works well with angular-t
阅读全文
摘要:$parse is useful when you want to parse an expression and the context is not defined yet. For example, I have a table component which allows user to p
阅读全文
摘要:Child: parent:
阅读全文
摘要:In Angular 1.5, there is no link and compile. So use if you transclude, you cannot access the fifth arguement in link function, which is transcludeFn.
阅读全文
摘要:If you know ui-router, multi-transclude should be easy for you also. In previou Angular version <1.4, one diretive can only have one transclude elemen
阅读全文
摘要:angular.module('APP', []) .controller('MainController', function($scope, UserConstants){ var user = { firstName: 'Benjamin', lastName: 'Roth' }; this.user = user; this.userTypes = ...
阅读全文
摘要:Install Karam: npm install -g karma npm install -g karma-cli Init Karam: karma init First test: 1. Add test file to the karma.conf.js: // list of file
阅读全文
摘要:Check the website: https://jmdobry.github.io/angular-cache/#using-angular-cache-with-http Install: npm install --save angular-cache getServiceDetail(
阅读全文
摘要:function getCompiledElement() { $scope.chart = { additional: "$ 1.56 / per minute", text: "phoneCard.voice", total: 250, unit: "MIN", used: 127 }; con
阅读全文
摘要:const stores = Immutable.List([ { name: 'Store42', position: { latitude: 61.45, longitude: 23.11, }, address: 'whatever' }, { name: 'Store2', position
阅读全文
摘要:Install: npm install ionic cordova -g Create a project with blank template: ionic start <project_name> blank Start: cd <proejct_name> ionic serve Then
阅读全文
摘要:When doing search function, you always need to consider about the concurrent requests. AEvent ----(6s)---> AResult ------(100ms)------- BEvent -----(1
阅读全文
摘要:.blue{ color: blue}.bold{ font-weight: bold;}.large{ font-size: 40px;}ngClass can accept an array:ngClassngClass can take a string:ngClassngClas...
阅读全文
摘要:Angualr 1.4:.directive('counter', function counter() { return { scope: {}, restrict: 'EA', transclude: true, bindToController: { cou...
阅读全文
摘要:ngMessageFormatcan be installed via npm using the following command:$ npm install angular-message-format --saveangular.module('myApp', ['ngMessageForm...
阅读全文