selectors can be called as
elements <app-servers> ---> defined as selector:'app-servers'
attributes <div app-servers> --> defined as selector:[app-servers]
styles <div class='app-servers> --> defined as selector:'.app-server'
Data Binding --> communication between html and typescript file
we use to output data --> string Interpolation {{data}}
--> property binding { [property] = "data" }
react to user --> Event Binding ((event) = "expression)
Combination of both is called two way data binding. --> ([(ngModel)] = "data")
For two way data binding to work, we need to enable ngModel directive. this is done
by adding FormsModule to the imports[] array in the app module.
we also need to add forms importing odule in [Link] file.
Directives:
Directives are instructions to the dom
@input() --> input decorator ( used to pass data from parent to child component)
@output() --> output decorator ( used to pass data from child to parent component)
these decorators are used to pass the data between the components.
event emiter helps to call the parent function from the child element