New project to use ANGULARJS, so take time to read a bit of information, by the way to remember
The Almighty Hello World
<!doctype html>
Module.js
var mymodule = angular.module ("Helloangular", []) Mymodule.controller ("Helloangular", [' $scope ', function Helloangular ($scope) {$scope. Greeting = {text: ' Hello '};}]);
Run effect
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/70/E4/wKioL1XAs6_TqnCcAAAP6Tl0MzM133.jpg "title=" 1.PNG " alt= "Wkiol1xas6_tqnccaaap6tl0mzm133.jpg"/>650) this.width=650; src= http://s3.51cto.com/wyfs02/M00/70/E7/ Wkiom1xaseujktflaaap6tl0mzm089.jpg "title=" 1.PNG "alt=" wkiom1xaseujktflaaap6tl0mzm089.jpg "/> page shows Hello, Angular
ANGULARJS directive
HTML page
<!doctype html>
JS Code
var mymodule = angular.module ("Helloangular", []) mymodule.directive ("Hello", function () {return{restrict: ' E ', Template: ' <div>hi everyone</div> ', Replace:true}});
Run Effect: page display Hi everyone
Bidirectional data binding
<!doctype html>
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/70/E7/wKiom1XAtc3SOIg_AAAhi-4ax34874.jpg "title=" 2.PNG " alt= "Wkiom1xatc3soig_aaahi-4ax34874.jpg"/>
This article is from "Avatar" blog, please make sure to keep this source http://shamrock.blog.51cto.com/2079212/1681702
ANGULARJS Study Notes