An Overview of Angular 2
The official site for Angular is https://angular.io/ .The site has all information and documentation about Angular 2.
You can know more about Type script from the official site http://www.typescriptlang.org/.
Angular 2 has the following components −
- Modules − Modules are used in Angular JS to put logical boundaries in your application. It is the breakup of the application into based on individual functionalities instead of coding everything into one application. Each piece of code or module is designed to perform a single task.
- Component − This can be used to bring the modules together. It’s similar to the controllers we had in our AJS 1.x. It can be considered as a function or a kind of class as in Java
- Templates − This is used to define the views of an Angular JS application. It’s more like a regular HTML which renders the DOM as per the instructions it receives from component or the directive.
- Directive - A directive is a custom HTML element that is used to extend the power of HTML. Angular 2 has the following directives that get called as part of the Browser Module
- Ngif - The ngif element is used to add elements to the HTML code if it evaluates to true, else it will not add the elements to the HTML code.
- ngFor-The ngFor element is used to elements based on the condition of the For loop.
- Metadata − Metadata tells angular how to utilize and compile the component.. This can be used to add more data to an Angular JS class.
- Service − A service is used when a common functionality needs to be provided to various modules. For example, we could have a database functionality that could be reused among various modules. And hence you could create a service that could have the database functionality.
The best part is we do have the class, encapsulation, import, export features available for users in Angular 2.Futher on we do have Dependency Injection and Data B