HGPA

Angular Notes

These are notes to references regarding advanced Angular.js concepts. Working knowledge of Angular is assumed.

Modules

HTML: <html ng-app="myApp">

JS: var myAppModule = angular.module('myApp', []);

Modules:

Configuration blocks:

Run blocks:

Convenience methods on module can be used to configure providers.

angular.module('myModule', []).
  value('a', 123).
  factory('a', function() { return 123; }).
  directive('directiveName', ...).
  filter('filterName', ...);

// is same as

angular.module('myModule', []).
  config(function($provide, $compileProvider, $filterProvider) {
    $provide.value('a', 123);
    $provide.factory('a', function() { return 123; });
    $compileProvider.directive('directiveName', ...);
    $filterProvider.register('filterName', ...);
  });

Further Reading:

Providers

Providers:

Services:

Special Purpose:

TODO: See "Service v. Factory" notes

Further Reading:

Provider Services

Provider Services:

myModule.provider('someProvider', {
    $get: function () {
        return {
            message: 'hello!'
        }
    }
})

Factory Services

Factory Service:

myModule.factory('someFactory', function() {
    return {
        message: 'hello!'
    }
})

Serivce Services

Services:

myModule.service('someService', function() {

    var myMessage = 'hello';

    this.getMessage = function() {
        return {
            message: myMessage
        }
    }
})

Constant Services

Constants:

Value Services

Values:

TODO: Decorators


Scopes

Scopes:

Notes:

Lifecycle:

Further Reading:


Directives

Directives:

Further Reading:


TODO: routing TODO: testing


Angular Concepts

Digest Loop

Dependency Injection

Angular Conventions

Generators & Boilerplate

Twitter

Who should you follow you ask?

Angular Team:

Angular:

Angular Resources:

Cheetsheets

References and Further Reading

Some Browserify + Angular Links:

Filename: angular.md (Edit)
Modified: 2016-08-14 (ae944649621e37d8c3d986f541f93e746cf9bd65)
Created: 2016-08-14 (ae944649621e37d8c3d986f541f93e746cf9bd65)