From the course: Angular: Animations
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Creating route view components - Angular Tutorial
From the course: Angular: Animations
Creating route view components
- [Instructor] We'll now go about building a set of components which will be controlled by the router once it is set into place. This will allow the user to switch different views through the main navigation of our project. Each view will eventually contain different Angular animation demos. So, right now we have our app.component.ts file. Let's go ahead and inside of our source folder, we'll create a new file and call this home.component.ts, all right. You'll find in our snippet file that we have a snippet for a basic component so we'll paste that in here and this basic component snippet just imports component from Angular Core and then we declare our component metadata such as our template and our styles. And again, these are backticks and not simple single quotes. This allows us to do multi-line templates and styles inside of Angular. And then we export class MyComponent. However, this is going to be called HomeComponent eventually, but we'll get to that in a minute. What we're…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
(Locked)
Verifying the animations package4m 50s
-
(Locked)
Project module configuration2m 4s
-
(Locked)
Application layout5m
-
(Locked)
Creating route view components5m 2s
-
(Locked)
Configuring project routes6m 5s
-
(Locked)
Challenge: Create a 404 route view24s
-
(Locked)
Solution: Create a 404 route view1m 35s
-
(Locked)
-
-
-
-
-