ng-bind-html//Binding HTML
Ng-cinclude//Binding template
Angular.copy ()
Angular.extend (DST,SRC)//Copy all attributes of SRC to DST
vardebug =true, Logger={print:function(s) {returnDebug?s: '}; App.controller (' Controllerone ', [' $scope ',function($scope) {//mixin $scopeangular.extend ($scope, Logger); //define our $scopeAngular.extend ($scope, {myVar:1, log:function() { This. Print ( This. MyVar); } });}]); App.controller (' Controllertwo ', [' $scope ',function($scope) {//mixin $scopeangular.extend ($scope, Logger); //define our $scopeAngular.extend ($scope, {myVar:2, log:function() { This. Print ( This. MyVar); } });}]);
App.controller (' Thingcontroller ', [' $scope ',function($scope) {//Private var_thingone =' One ', _thingtwo=' both '; //ModelsAngular.extend ($scope, {get Thingone () {return_thingone; }, set Thingone (value) {if(Value!== ' one ' && value!==' both ') { Throw NewError (' Invalid value ' (' +value+ ') forThingone '); }, get Thingtwo () {return_thingtwo; }, set Thingtwo (value) {if(Value!== ' both ' && value!==' three ') { Throw NewError (' Invalid value ' (' +value+ ') forThingtwo '); } }); //MethodsAngular.extend ($scope, {//in the HTML template, something like {{things}}get Things () {return_thingone + "+_thingtwo; } });}]);
Angular common directives and methods