ViewEncapsulation:
It is way of scoping your styles in Angular. It
helps with style control over components.
It provides three ways: -
0: - EMULATED – No Shadow DOM; Style
Encapsulation;
1: - NATIVE - Shadow DOM; Style Encapsulation
2: - NONE- No Shadow DOM; No Style Encapsulation
Shadow DOM is a new DOM feature that
helps you build components. You can think of shadow DOM as a scoped
subtree inside your element.
Building Blocks of Angular:
Metadata; Template; Routing; Data Binding;
Component;
Services; Dependency Injection; Directives;
Pipes and Filter;
Forms; Modules.
Life cycle Hooks sequence Angular:
ngOnChanges();
ngOnInit();
ngDoCheck();
ngAfterContentInit();
ngAfterContentChecked();
ngAfterViewInit();
ngAfterViewChecked();
ngOnDestory();
Guess the output for below:-
a. console.log(2 + '2');
b. console.log(2 - '2');
Answer: a: 22; b:0;
+ operator is applied to number(as Math operator) as well as to String (concatenate)
- is only number operator.
Thank you!
Satender Kumar Mall
Twitter: @satenderiiit
No comments:
Post a Comment