October 2017
Intermediate to advanced
280 pages
6h 50m
English
Most beginners are fascinated by the data binding mechanism in AngularJS. The basic Hello world! example looks similar to this:
function MainCtrl($scope) {
$scope.label = 'Hello world!';
}
<body ng-app ng-controller="MainCtrl">
{{label}}
</body>
If you run this, Hello world! magically appears on the screen. However, that is not the only most impressive thing! If we add a text input and we bind it to the label property of the scope, each change will reflect in the content displayed by the interpolation directive:
<body ng-controller="MainCtrl">
<input ng-model="label">
{{label}}
</body>
How awesome is that! This is one of the main selling points of AngularJS: the extreme ease of achieving data binding. We add ...
Read now
Unlock full access