-
Notifications
You must be signed in to change notification settings - Fork 10
Angular notes
Michael Hulse edited this page Mar 24, 2020
·
7 revisions
Dissect: https://malcoded.com/posts/angular-ngclass/
When I teach Angular, I keep telling my students that Angular components are custom HTML elements, while Angular directives are custom attributes.
Use components to generate chunks of HTML code, and define them as custom HTML elements. Use directives to modify the behavior or the appearance of an existing HTML element, and use an attribute to activate the directive.
– https://www.beyondjava.net/angular-components-non-standard-selectors
-
#
= Template reference variable (declares DOM elements as variables:<div #myDiv>blah</div>
) -
()
= Event binding -
[]
= Property binding -
[()]
= Two-way property binding -
{{ }}
= Interpolation -
*
= Structural directives