<commit_before>---
layout: post
title: "Use @NgModule to Manage Dependencies in your Angular 2 Apps"
description: "The Angular 2 @NgModule decorator allows for easier management of dependencies within the Angular 2 framework."
date: 2016-09-15 08:30
category: Technical Guide, Angular, Angular2
banner:
  text: "Auth0 makes it easy to add authentication to your AngularJS application."
author:
  name: "<NAME>"
  url: "https://twitter.com/mgonto"
  mail: "<EMAIL>"
  avatar: "https://www.gravatar.com/avatar/df6c864847fba9687d962cb80b482764??s=60"
design:
  image: https://cdn.auth0.com/blog/angular/logo.png
  image_size: "75%"
  image_bg_color: "rgb(1, 70, 166)"
  bg_color: "rgb(1, 70, 166)"
  bg_merge: true
tags:
- angular2
- ngmodule
- angular
related:
- introducing-angular2-jwt-a-library-for-angular2-authentication
- create-a-desktop-app-with-angular-2-and-electron
- creating-your-first-real-world-angular-2-app-from-authentication-to-calling-an-api-and-everything-in-between
---

<div class="alert alert-info alert-icon">
  <i class="icon-budicon-664"></i>
  <strong>Get the "Migrating an Angular 1 App to Angular 2 book" for Free.</strong> Spread the word and <a href="https://auth0.com/e-books/migrating-to-angular2">download it now!</a>
</div>

---

**TL;DR** Angular 2 RC 5 introduced a series of new features including [@NgModule](https://angular.io/docs/ts/latest/guide/ngmodule.html), lazy loading support for the router, and [Ahead-of-Time (AoT)](http://blog.mgechev.com/2016/08/14/ahead-of-time-compilation-angular-offline-precompilation/) compilation. In this post, we'll look at the new `@NgModule` decorator and see how it can make managing dependencies a lot easier. 

---

[Angular 2](https://angular.io/) has officially reached a major milestone, the [final 2.0 release](http://angularjs.blogspot.com/2016/09/angular2-final.html). The Release Candidate (RC) 5 version of the framework, released just a few weeks ago, introduced many new features that will make developing Angular 2 applications easier but also run better and faster. Among the new features is lazy loading support for the official router, Ahead-of-Time (AoT) compilation for components and services, a new and improved forms module, and a new decorator called @NgModule. <commit_msg>Updated logo<commit_after>---
layout: post
title: "Use @NgModule to Manage Dependencies in your Angular 2 Apps"
description: "The Angular 2 @NgModule decorator allows for easier management of dependencies within the Angular 2 framework."
date: 2016-09-15 08:30
category: Technical Guide, Angular, Angular2
banner:
  text: "Auth0 makes it easy to add authentication to your AngularJS application."
author:
  name: "<NAME>"
  url: "https://twitter.com/mgonto"
  mail: "<EMAIL>"
  avatar: "https://www.gravatar.com/avatar/df6c864847fba9687d962cb80b482764??s=60"
design:
  image: https://cdn.auth0.com/blog/angular/logo3.png
  bg_color: "#012C6C"
tags:
- angular2
- ngmodule
- angular
related:
- introducing-angular2-jwt-a-library-for-angular2-authentication
- create-a-desktop-app-with-angular-2-and-electron
- creating-your-first-real-world-angular-2-app-from-authentication-to-calling-an-api-and-everything-in-between
---

<div class="alert alert-info alert-icon">
  <i class="icon-budicon-664"></i>
  <strong>Get the "Migrating an Angular 1 App to Angular 2 book" for Free.</strong> Spread the word and <a href="https://auth0.com/e-books/migrating-to-angular2">download it now!</a>
</div>

---

**TL;DR** Angular 2 RC 5 introduced a series of new features including [@NgModule](https://angular.io/docs/ts/latest/guide/ngmodule.html), lazy loading support for the router, and [Ahead-of-Time (AoT)](http://blog.mgechev.com/2016/08/14/ahead-of-time-compilation-angular-offline-precompilation/) compilation. In this post, we'll look at the new `@NgModule` decorator and see how it can make managing dependencies a lot easier. 

---

[Angular 2](https://angular.io/) has officially reached a major milestone, the [final 2.0 release](http://angularjs.blogspot.com/2016/09/angular2-final.html). The Release Candidate (RC) 5 version of the framework, released just a few weeks ago, introduced many new features that will make developing Angular 2 applications easier but also run better and faster. Among the new features is lazy loading support for the official router, Ahead-of-Time (AoT) compilation for components and services, a new and improved forms module, and a new decorator called @NgModule. 
{'fraction_non_alphanumeric': 0.12100201297248937, 'fraction_numerical': 0.038246477298143594, 'mean_word_length': 4.59, 'pattern_counts': {'":': 0, '<': 23, '<?xml version=': 0, '>': 23, 'https://': 12, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7478506', 'n_tokens_mistral': 1528, 'n_tokens_neox': 1383, 'n_words': 455}