This document provides instructions for setting up and using the Angular CLI tool. It outlines prerequisites like Node.js and NPM, and commands for installing the CLI globally and generating a new Angular application. It also describes the basic file structure generated by the CLI, including files for routing, modules, components, styles, tests, and more. The next session will cover generating a new component and communication between components.
5. IDE Editor Online Editor
https://code.visualstudio.com/
Available for macOS, Linux, and Windows
VS Code includes support for debugging, embedded Git control,
syntax highlighting, intelligent code completion, snippets,
and code refactoring.
6. View Menu > Integrated Terminal
PS H:angular2movie>ng serve
http://localhost:4200
9. index.html
The application host page. It loads a few essential scripts in a
prescribed order. Then it boots the application, placing the root
AppComponent in the custom <my-app> body tag.
favicon1.ico
The application icon that appears in the browser tab.
styles.css
Global styles for the application.
main.ts
Compiles the application with the JIT compiler and bootstraps the
application's main module (AppModule) to run in the browser
app.module.ts
Defines AppModule, the root module that tells Angular how to
assemble the application. Right now it declares only the
AppComponent. Soon there will be more components to declare.
app.component.ts
Defines the same AppComponent as the one in the QuickStart
playground. It is the root component of what will become a tree
of nested components as the application evolves.
10. Focus on the following files in the /src folder.
14. Generating Components, Directives, Pipes and Services
Creating a new component movie-rating:
ng generate component movie-rating
https://www.npmjs.com/package/ng-cli-2