| nodepad | An angular application demonstrating more directives and custom components |
- We used
class.xto conditionally add the classxaccording to a boolean value - We used
style.xto set a specific style property by binding - We used them both to implement selection
- We saw how to create a component manually, and then used the generator to create them automatically
- We learned how to define inputs using the
@Inputdecorator - We saw how to populate inputs with values
- We saw how to use data binding to populate inputs
- We saw how to define output events uisng the
@Outputdecorator - We saw how to regiter to the events and respond to them
- We saw how to carry payload in the event, and consume it in the event handler
- We learned what are lifecycle hooks and how to use them
- We talked about several lifecycle hooks:
OnInitOnDestroyAfterViewInitOnChanges
- We saw how to use the
OnChangeshook to be notified when an input changes - We saw that we can also use the javascript properties syntax for the same purpose by implementing a
getterandsetterfor the property - We saw the
@ViewChilddecorator and that we can use it to access a part of the view in our typescript code.- We saw a BAD example of how to change the state of a DOM element using the
@ViewChilddecorator. Later in the advanced course we will see other ways to use the@ViewChilddecorator, ways that are far more Best Practice
- We saw a BAD example of how to change the state of a DOM element using the