Using Angular for Single Page Applications (SPAs) ================================================= By `Venkata Koppaka`_ In this article, you will learn how to build a SPA-style ASP.NET application using AngularJS. In this article: - `What is AngularJS?`_ - `Getting Started`_ - `Key Components`_ - `Angular 2.0`_ `View this article's samples on GitHub `_. What is AngularJS? ------------------ `AngularJS `_ is a modern JavaScript framework from Google commonly used to work with Single Page Applications (SPAs). AngularJS is open sourced under MIT license and the development progress of AngularJS can be followed on `its GitHub repository `_. The library is called Angular because HTML uses angular brackets. AngularJS is not a DOM manipulation library like jQuery but it uses a subset of jQuery called jQLite. AngularJS is primarily based on declarative HTML attributes that you can add to your HTML tags. You can try AngularJS in your browser using the `Code School website `_. Version 1.3.x is the current stable version and the Angular team is working towards a big rewrite of AngularJS for V2.0 which is currently still in development. This article focuses on Angular 1.X with some notes on where Angular is heading with 2.0. Getting Started --------------- To start using AngularJS in your ASP.NET application, you must either install it as part of your project, or reference it from a content delivery network (CDN). Installation ^^^^^^^^^^^^ There are several ways to add AngularJS to your application. If you’re starting a new web application in Visual Studio 2015 and ASP.NET 5, you can add AngularJS using the built-in NPM and Bower support. Simply open ``bower.json`` and add an entry to the ``dependencies`` property: .. _angular-bower-json: .. literalinclude:: angular/sample/AngularSample/src/AngularSample/bower.json :language: javascript :linenos: :emphasize-lines: 11 One you save the file, Angular will be installed for your project, located in the Bower folder. You can then use :doc:`Grunt ` or :doc:`Gulp ` to copy the appropriate files into your ``wwwroot/lib`` folder, as shown: .. image:: angular/_static/angular-solution-explorer.png Next, add a ``