Why AngularJS 2.0?
And that’s where the beauty lies in repainting the DOM in faster way in AngularJS 2.0. In AngularJS 1.x all components are loaded in one go whether they are required or not but in AngularJS 2.0 the modules and components are loaded only when necessary during the runtime and that brings down the memory footprint of the browser, thus making it faster and more efficient.
How Angular2.x solutions are organised:
The link ‘https://angular.io/docs/ts/latest/quickstart.html’ will give you the complete process to create and run your first AngularJS 2.0 application. The approaches demonstrated there can be divided into 5 important steps as follows:
- Include ‘startup’ section inside that Master page that relates to the section in systemjs.config.js file to download the required framework during runtime in an asynchronous way.
- Refer to the Startup.js file in systemjs.config.js file to download the required modules you created or imported from @angular-core.
- The modules in turn download the required components.
Diagrammatically we can depict the entire process of binding in the following way:
Pre-requisites for developing AngularJS 2.0 Application
Three things are required to install in your machine to develop Angular Application:
- Visual Studio IDE from https://www.visualstudio.com/
- TypeScript for Visual Studio 2015 from https://www.microsoft.com/en-us/download/details.aspx?id=48593
- js from https://nodejs.org/en/
We can tailor this runtime downloadable/inclusion of objects, components, modules and framework as required to make our application faster. In the next blog I will be discuss some of the other pre-requisites like shim.js, zone.js, Reflect Metadata, TypeScript, Node.js etc. in detail that are required to execute AngularJS 2.0 application.