NOTE: This was created long before we had the Angular CLI which is much more recommended to use rather than the methods described here for setting up a development environment and production bundles. While the components and examples in this repository are still valid, you should rather use the upgraded project.

Angular 2 quick start templates

Here's a simple example Angular 2 application with angular2-materials. We've chosen to use JSPM for development setup since transpiling in the browser is convenient when developing, and JSPM is straightforward to configure.

The example also shows how to create an Ahead Of Time production bundle, that ensures fast loading in production.


For development remember to run:

npm install

for installing dependencies.

Use index_dev.html for development

Production bundle creation

The production bundle is created using Ahead Of Time compilation ( ). This way we don't need to include the angular compiler at runtime, neither does the templates need to be compiled as they are translated to javascript instructions that generates the page programatically. This is one of the reasons Angular 2 is both faster and lighter than many alternative frameworks (and also faster and lighter than not using any framework at all).

To build a production bundle (aot-build.min.js) for running in index.html type:

npm run dist

Test environment

To start a simple web server for testing type:

npm run devserver

This will start a webserver at http://localhost:3000

(remember to go to index_dev.html if you're developing)

Angular2 Templates

Angular showcase / examples

Angular2 Templates Info

⭐ Stars 12
🔗 Source Code
🕒 Last Update 3 years ago
🕒 Created 6 years ago
🐞 Open Issues 8
➗ Star-Issue Ratio 2
😎 Author fintechneo