Join Ray Villalobos for an in-depth discussion in this video Understanding template types, part of Learn AngularJS 2: The Basics.
- View Offline
- [Voiceover] Understanding how angular templates…work is the key to building almost any application.…Now because of some of the new features…of Typescript and ES6 they're going to be a little…different than Angular1 templates.…So let's take a look at the three types of templates…that you can use with Angular JS2.…Now, of course, we're already using our template right here…and it's all embedded into this template property…in our component decorator.…So it's right here and what this is saying…is look for a selector or a tag called "my-app"…in our HTML.…
And right now just replace that with this HTML.…So if we look at the index.html file…we'll notice that we have this "my-app" tag right here.…Normally, it should say loading...…but because we've got Angular JS running things…it's replacing that with this right here.…So the first way of creating a template is by using…this template property and just putting all of your…HTML in this single line.…Now the thing is, of course, complex HTML…is going to end up taking more than one line…
In these tutorials, Ray Villalobos shows you how to start using AngularJS 2 in your own projects. He starts by defining what exactly Angular 2 is and how it differs from AngularJS 1. Then, once the basics are out of the way, he sets up the template that will drive the project and starts coding. Ray shows how to divide your project into modules, work with events, style content with CSS, and create components and subcomponents. Plus, find out how to change content dynamically using data pipes.
The template is included as a free download for all members.
- What is AngularJS 2?
- Setting up our template
- Creating a simple component
- Using multiple modules
- Displaying data in our templates
- Working with events
- Creating a subcomponent
- Filtering content through data pipes