Join Ray Villalobos for an in-depth discussion in this video Using properties, part of Learning AngularJS 2 (2016).
- [Voiceover] AngularJS has a way to link properties…from your template to your component using square brackets.…Right now we're using a method called "interpolation."…Right here, with these double curly brackets,…we're outputting the value of a variable…that is in our component.…If we go back to our component,…we'll notice that we initialize that with my name, Ray.…And, if we click on one of these elements right here,…we reset that value to be whatever we click on.…Now there's another way of doing that,…and that is using square bracket notation.…
I'll make a copy of this one so you can see the difference.…Instead of just displaying this,…we can actually modify the property of this label.…And so let's go ahead and do...…"innerHTML" that's a DOM property of any regular…HTML tag, that means the HTML…inside this HTML element.…What we can do is just set that to…the name that we want in here.…
So we'll just say, "name."…So let's go ahead and save this.…Right now we've got two of them,…so let's go ahead and get rid of the other one.…
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