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 Angular components

Creating Angular components - Angular Tutorial

From the course: Angular: Animations

Start my 1-month free trial

Creating Angular components

- We'll now create two new Angular components for both the videotitle, and the large play-back overlay, which currently exist as DOM elements within our main application. This will allow us to build out our Angular-Animations within them. The first thing we'll do is go ahead, and inside of APP, create a new file, and this will be videotitle.component.ts We'll create another one, and this one will be called playoverlay.component.ts Alright, with both of these created, we can now go ahead and paste in some snippets from our snippets file, in order to build out the component structure. So, here is my videotitle component snippet. And what we have here is the import of both component and input from Angular-Core. We have a selector to be used of video-title, and our template is basically just a div with some ng content, since we're going to pass through that title data in there. Then we have some basic styles, which, of course, are only applying to this div, which set the styles for our…

Contents