most valuable keyword definition of Angular -- i

 TBD --- To Be Discussed


1.  Angular is a open source javascript framework which is used to build single page web application with the help of typescript and html.

It has capability to change DOM at runtime. we can use ES5, ES6, typescript, to write an Angular code.

Angular has capability to provide data-handling by dividing the code into smaller bit of information.

The architecture of Angular is based on service and controller. We can use ES5, ES6, typescript to write an Angular code. 


2. Resolver is a class that implement resolve interface of angular router. Resolver acts like a middle-ware which can be executed before a component is loaded. 

3 . AuthGuard is used to prevent the access of  authorization if the user is not authenticated or access token is expire.


4. component is just a typescript class. It's a key features in angular. we can build whole application by composing a couple of component. appComponent is the root component of whole application.

component in Angular are the directives which are comprise of decorator (@component) and template. component can be used inside another component by using selector.

The component mainly consist of four parts.

                file --------|--------- HTML   ==> for UI

                                 |---------scss / css ===> to define style

                                |---------sepcs ===> to write test cases

                                |---------ts ===> to define functionality ( property & logic )


We defined AppModule (angular.module ) to be the main entry point of Angular application to get the root Element.

plateformBrowserDynamic().bootstrapModle(AppModule)        // What part of application will be compiled is being determined by main.ts file 


angular.json----main.ts ----index.html----------app.module.ts

We created angular.module called myApp in app.js file


5. Decorator is a typeScript features which allow to enhance class or element. JavaScript object are passed within component decorator as a argument.

@NgModule ----

@Component ----

@Injector --------

@Input ------------

@Output ---------

@ViewChild -----

6. The constructor of component class executed first before the execution of Angular LifeCycle hook events. Angular component lifecycle has 8 different stages and every stages is called hook events. 

        constructor()

ngOnChange()

ngOnInit()

ngDoCheck()

ngAfterContentInit()

ngAfterContentChecked()

ngAfterViewInit()

ngAfterViewChecked()

ngOnDestroy()


7. Fat arrow are used to write more concise syntax for function expression.

8. Hook events are used to control over the component. 

9. Angular executes lifecycle hook events in a specific order, after the successful execution of constructor method.


10. service is used to monitor and fetching the data from the server with the help of observable. We subscribe the method when I need  observable observe the server till service processing for data.










 















Comments

Popular posts from this blog

Become a Expert + Secret of Success -- ii

Change Detection

without writing media queries How to make responsive component