This project was generated with Angular CLI version 1.1.3.
Run ng serve
for a dev server. Navigate to http://localhost:4200/
. The app will automatically reload if you change any of the source files.
Run ng generate component component-name
to generate a new component. You can also use ng generate directive|pipe|service|class|module
.
Run ng build
to build the project. The build artifacts will be stored in the dist/
directory. Use the -prod
flag for a production build.
Run ng test
to execute the unit tests via Karma.
Run ng e2e
to execute the end-to-end tests via Protractor.
Before running the tests make sure you are serving the app via ng serve
.
To get more help on the Angular CLI use ng help
or go check out the Angular CLI README.
- The Tour of Heroes app uses the double curly braces of interpolation (a type of one-way data binding) to display the app title and properties of a Hero object.
- You wrote a multi-line template using ES2015's template literals to make the template readable.
- You added a two-way data binding to the element using the built-in ngModel directive. This binding both displays the hero's name and allows users to change it.
- The ngModel directive propagates changes to every other binding of the hero.name.
- The Tour of Heroes app displays a list of selectable heroes.
- You added the ability to select a hero and show the hero's details.
- You learned how to use the built-in directives ngIf and ngFor in a component's template.
- You created a reusable component.
- You learned how to make a component accept input.
- You learned to declare the required application directives in an NgModule.
- You listed the directives in the @NgModule decorator's declarations array.
- You learned to bind a parent component to a child component.
- You created a service class that can be shared by many components.
- You used the ngOnInit lifecycle hook to get the hero data when the AppComponent activates.
- You defined the HeroService as a provider for the AppComponent.
- You created mock hero data and imported them into the service.
- You designed the service to return a Promise and the component to get the data from the Promise.
- You added the Angular router to navigate among different components.
- You learned how to create router links to represent navigation menu items.
- You used router link parameters to navigate to the details of the user-selected hero.
- You shared the HeroService among multiple components.
- You moved HTML and CSS out of the component file and into their own files.
- You added the uppercase pipe to format data.