Every time a new controller and its corresponding data-binding is created a scope is created.
In Angular, we use Services to get data from the server then use $scope to pass the data to the view, the presentation layer.
Tod Motto a famous Angular developer suggests that we think of the $scope as a bridge between the JavaScript and the DOM as a glorified ViewModel.
The essential concept of scope exists in other programming languages and frameworks including vanilla JavaScript. Angualr's $scope comes with its own flavor : it's only used in controllers binds data from the controller to the view
So informative.
ReplyDeleteAngularjs Training | Angularjs Training in Chennai
Angular 2 Training in Chennai angular2 Training in Chennai | angular2 Training in Chennai Angular 2 Training in Chennai Angular 2 Training in Chennai
ReplyDelete