- AngularJS is a great (so-called Super-heroic) framework if you want to build single page applications (SPA) consisting of multiple views (smaller web pages so to say). That said, it is not limited to SPAs and could be used with any kind of web applications. If you have worked in past with JQuery, you would be amazed to see the simplicity that AngularJS brings on the table with respect to DOM manipulation. Just this feature has got me on board with Angular.
- Modular framework: Angular is a modular framework. Angular modules, simply speaking, are containers. They could be used to create some of the following:
- Key Characteristics: Following are the areas where AngularJS shines or, in other words, key characteristics:
- MVC (Model-view-controller)
- Views have directives, filters etc. There could be multiple views on a single page. There could be different views such as mobile, desktop etc.
- Controllers is used to provide methods to act upon the views. Each view need to be associated with a controller. It is the route that configures a view with a controller. Controller and View are glued together using $scope object.
- Controllers use services/factories/providers etc to provide CRUDs etc.
- DOM manipulation (jqLite)
- Data binding
- Routing: The concept is key to SPA. It is used to load different views and controllers based on different routes.
- Directives: There are out-of-the-box directives available from Angular. That said, one could also create custom directives as and when required. Some of the most commonly used directives are ng-app, ng-model, ng-click, ng-submit, ng-repeat, ng-controller etc.
- Ajax/Promises (Async)
- Object/module/view loading
- Dependency injection
- Key Terminologies
- $scope: It is very important to understand the concept behind $scope when understanding Angular views and controllers. $scope acts as a glue between view and controller. Angular automatically inserts/injects (using inbuilt dependency injection) a scope object into a controller as the controller gets used. As the ng-controller is applied to an element such as body or div, the scope becomes available to the view.
- Important AngularJS bookmarks for Developers
Latest posts by Ajitesh Kumar (see all)
- Beta Distribution Explained with Python Examples - September 24, 2020
- Bernoulli Distribution Explained with PythonExamples - September 23, 2020
- K-Nearest Neighbors Explained with Python Examples - September 22, 2020