1. What is camel case and pascal case?
In camel case, the first letter of the first word in the identifier is lower case, while the first letter of subsequent word is uppercase.
eg: camelCase
In pascal case, the first letter of every word in the identifier is upper case.
eg: PascalCase
2. What are directives?
Angular directives are the functions that are used to extend the power of the HTML by giving it new syntax like ngModel, ngIf, etc.
3. What is the use of ngModel and significance of [] and () in ngModel?
ngModel is a inbuilt directive that binds the input, select, textarea, and store the required user value in a variable for future use. It works with two way data binding concept.
- (ngModel) : It is used to bind data to the model.
- [ngModel] : It is used to bind data to the view.
- [(ngModel)] : It is used in bidirectional data binding. (i.e. model to view and vice versa)
4. What are expressions or interpolation?
Expression or interpolation are the type of unidirectional data binding that bind the value to a UI element. Expressions are written inside double curly braces such as {{expression}}.
5. What is the importance of FormsModule?
FormsModule is a module that is used to handle data provided by user. It provides various directives and that helps in changing the behavior of the HTML.
No comments:
Post a Comment