NgModule is a decorator function that takes a single metadata object whose properties describe the module. The most important properties are:
declarations – the view classes that belong to this module. Angular has three kinds of view classes: components, directives, and pipes.
exports – the subset of declarations that should be visible and usable in the component templates of other modules.
imports – other modules whose exported classes are needed by component templates declared in this module.
providers – creators of services that this module contributes to the global collection of services; they become accessible in all parts of the app.
bootstrap – the main application view, called the root component, that hosts all other app views. Only the root module should set this bootstrap property.
Blow are the special features of Angular 2:
Components − Angular 2 is a componenent based framework where as Angular 1 is Controller based framework. Components help to build the applications into many modules. This helps in better maintaining the application over a period of time.
Services − Services are a set of code that can be shared by different components of an application. So for example if you had a data component that picked data from a database, you could have it as a shared service that could be used across multiple applications.
While the Internet is growing up, more demand for Rich Internet applications is growing proportionally. The end user always expecting have the best look and feel, at the same time expecting the larger functionalities with the minor actions made on the application pages.
There are many MVC based java script frameworks have been came into opensource market in the last decade, which helps the developer to build the Rich Internet Applications easy.
Listed below are the few MVC based java script frameworks.
- ExtJS: Provides powerful big data grids, a modern theme, and plugin-free charting apart from the basic functionalities.Backbone.js: Provides models with key-value binding and custom events, collections, and connects it all to your existing API over a RESTful JSON interface.
- Agility.js: Using Agility JS, you can write maintainable and reusable browser code without the verbose or infrastructural overhead found in other MVC libraries.
- CanJS: Focuses on striking a balance between size, ease of use, safety, speed and flexibility. CanJS’s core supports jQuery, Zepto, Dojo, YUI and Mootools.
- ExtJS: Provides powerful big data grids, a modern theme, and plugin-free charting apart from the basic functionalities.
- rAppid.js: Lets you encapsulate complexity into components which can be easy used like HTML elements in your application. It uses a Shadow DOM, which is rendered as valid HTML in the document body or a specific target.
- Kendo UI: Contains the rich jQuery-based widgets, a simple and consistent programming interface, a rock-solid DataSource, validation, internationalization, a MVVM framework, themes, templates and etc.