Popular Angular JS Terms

Below are few popular terms used in Angular JS.

1. We call what AngularJS is MV*

Literally, model view whatever. AngularJS has a thing that lets you bind your model, the data, the JavaScript, objects, and variables to the view. The HTML, or in reality, the DOM, the document object model, the representation of the HTML in the browser’s memory. So, the objects and the data are connected to the thing that lets the browser pane per render onto the screen the web page.

2. ng-

When you see ng- in the HTML, that’s really a custom attribute and angularJS is using the fact that the browser DOM the memory has that available to then make decisions based on what it sees in those attributes, the value of those attributes.

3. Encapsulation

Encapsulation is making sure that we’re not polluting the global namespace, is a very important aspect of building extensible, reusable and complex software. So AngularJS makes this a fundamental part of its structure. When you build an AngularJS app, you’re going to see that there are certain elements and structural concepts that have the goal of not polluting the global namespace. Making sure that variables and functions that are defined don’t collide and contradict variables and functions defined elsewhere.

4. Dependency Injection

Dependency injection is giving a function an object. Rather than creating an object inside a function, you pass it to the function.

5. Scope

Scope is a big part of the things that binds the model to the view. It’s called Scope, and it’s an object from something called the Scope service, and it involves dependency injection. You can add Variables and Functions to the scope. Now the scope then becomes that middle piece, that piece between the view and the Controller.

6. Services

Angular services are singleton objects that get instantiated only once during the lifetime of an application. The main objective of a service is to organize and share business logic, models, or data and functions with different components of an Angular application.

Quick Note: You can take a function in JavaScript, and convert it to a String using toString() method.

7. Dependencies

Dependencies is a list of modules that myApp uses, or is dependent on. So if I want to use this ngMessages module, I have to include it in this list. And if there are others, I would just keep adding them in strings.

var myApp = angular.module("myApp", ['ngMessages', 'someOtherModule']);