This course has been updated! We now recommend you take the Angular 9 Fundamentals course.
Transcript from the "Challenge 3" Lesson
>> Scott Moss: Now you guys are gonna be doing the challenge. So flesh out the widgets template with the following stuff. A template expression via interpolation, so brackets, a property binding. An event binding and a two-way binding. They can be whatever you want.
>> Audience: [COUGH]
>> Scott Moss: Yes?
>> Audience: Is there any reason why you wrapped the style property with a bracket?
[00:00:38] Because I think it works with just the back ticks.
>> Scott Moss: In the bracket.
>> Audience: Yeah. In more that one style.
>> Scott Moss: Yeah, you have more than one.
>> Audience: Okay, so if you wanted to load a list.
>> Scott Moss: Yeah, you can have more than one style.
>> Audience: It's also pretty powerful.
[00:00:51] You can stack up, pretty cool.
>> Scott Moss: Yeah, you can put many styles here, so it just became a habit, and I think my linter freaks out if I don't.
>> Audience: I see.
>> Scott Moss: Or maybe it doesn't. It did earlier. I don't know. It doesn't like me. So.
>> Audience: Okay.
>> Scott Moss: [LAUGH] Just, so do I like, you know what I'll let this pass. I'll let this one pass. So, you can put multiple stuff in there, which is pretty awesome. So, yeah. Add these new template lessons that we learned. They can be anything, any properties. Add some clicks to your widgets.
[00:01:20] add some variables that are going to be rendered in a target via interpolation, an event binding, and a two-way. We didn't talk about two-way, I didn't talk about it on purpose. So, I need to leave something there for you guys to explore. But we did talk about open slides, so I didn't really show you an example of how to do it.
[00:01:36] But if you know how to do property and you know how to do event binding, It's just both of them combined. So, you should be fine there. Bonus, use a local variable via hash tag. Use a built-in directive via the asterisk and use the elvis operator with a setTimeout to demonstrate a temporary null.
[00:01:54] So I don't know about the Elvis thing, I need to look into that. The hashtag thing we went over, so you can check that out. Note, you can put that hashtag on anything in the template and it'll store as a lower variable. It's almost like if you use React, it's like refs.
[00:02:10] You ever use a ref in React? It's like that. Very similar.