Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Understanding STATE in angularJS

Tags:

angularjs

I am new to AngularJS. I tried to read about how states work in angular and different fields present in it, but didn't find any useful materials. Also AngularJS documentation doesn't explain states in a proper way, so if there are any resources to get good grasp of states in AngularJS.

like image 497
IfOnly Avatar asked Feb 10 '26 23:02

IfOnly


1 Answers

State is represented by scope objects.

Angular is a MVC/MVVM like framework where models (and view models) present the state of a certain context. Models object can for instance reflect the state of a database record or can be objects that define the current situation of the user interface.
Controllers and view models are used to manipulate model state.

Angular model objects are wrapped in scope instances, which are assigned to HTML (view) elements. Scopes are like view models from MVVM but differ in that they inherit from each other based on nesting of the HTML element.

Some good starter links:

  • https://github.com/angular/angular.js/wiki/Understanding-Scopes
  • http://docs.angularjs.org/guide/concepts
  • http://net.tutsplus.com/tutorials/javascript-ajax/3-reasons-to-choose-angularjs-for-your-next-project/
like image 125
null Avatar answered Feb 12 '26 14:02

null



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!