From the course: Angular Essential Training (2019)

Unlock the full course today

Join today to access over 22,400 courses taught by industry experts or purchase this course individually.

NgModule and the root module

NgModule and the root module - Angular Tutorial

From the course: Angular Essential Training (2019)

Start my 1-month free trial

NgModule and the root module

- [Instructor] Angular leverages decorators to help configure code like classes, methods, and fields. A decorator is an expression that evaluates to a function that makes it possible to annotate and modify code at design time. Angular has a bunch of decorators it provides in the platform. TypeScript provides support for decorators through its transpiler. The syntax for using a decorator is the @ symbol followed by the decorator name and then a pair of parentheses. What you put in the parentheses depends upon the decorator. An Angular application starts with an Angular module which gets configured using a decorator. Angular modules help to keep application code organized by blocks of functionality and features. A root module acts as the starting point module for an Angular application. We will begin by creating the root module class in a file named app.module.ts that is in the source/app folder of the project. We need to…

Contents