What is angular
Angular was introduced to create a single web page Application. The framework bring structure and consistency to web application.
Then what is typescript
So that make me to come down to compiler
Every Angular application consist of component and template which the browser(chrome — — -) can not understand .Therefore all the angular application need to be compiled first before running inside the browser.
Angular provide 2 type of compilation
a)JIT-Just in time compiler
b)AOT-Ahead of time compiler
JIT(Just in time compiler):-In Just in Time compiler angular application complier inside the browser during the run time.
AOT-(Ahead of time compiler):-In AOT compilation application compiles during the build time
Advantages of AOT:
b)Better security to the application
c)Developer can detect the error during build time.
By Default angular uses JIT compilation ng serve ng build
Use these command for AOT
a) ng serve — aot
b)ng build — aot
To change the port number while running angular application
ng server — port 3200