if directive will remove/add HTMLElement that can be accessed via binder scopes.
Setup 'if' attribute with new binder scope property.
false to binder scope property.
loop directive will render Array of objects to the DOM automatically once you assign, add, remove or modify array on binder scope with array property.
loop attribute with new binder scope property and set
el attributes with scopes to its child HTMLElement whichever you need in
- Render whole array of objects by just assign the array to binder scope property
- Add, remove or modify array of object will reflect automatically towards binded DOM. We can use any array methods which modified object.
- Basically these methods
pop, push, reverse, shift, unshift, splice, sortwill work out.
Note: Before using array methods on binder scope assign with empty/array of object to initiate functionality.