ES6 -> let (if multiple ref. change), cons (if no change)
- Use ES6 and ts
# TS:
- all features can be written in compile in js and run.
- TS is not loosly types. It's strict.
Example:
let abc: String;
abc: 634
Error: type 634 is not assignable to type 'String'.
Example:
let abc: any; // (data type can be used in abc variable. dont use any all time).
Important:
- npm i typescript g //(to install typescript)
- tsc - h //(help typescript)
- tsc abc.ts //(to run typescript. it now creates abc.js file . equivalent file code)
- tsc -v //(check version)
- ng --version (angular cli info-> angular cli version, node, os)
- overall angular application, we use angular cli. angular cli use webpack (like task runner, module bundler).
-ng equivalent to angular 2, 4, 5, 6
# Task runner -> small task like minify, file concatenate.
# Web pack -> modules bundle and make file
- Use ES6 and ts
# TS:
- all features can be written in compile in js and run.
- TS is not loosly types. It's strict.
Example:
let abc: String;
abc: 634
Error: type 634 is not assignable to type 'String'.
Example:
let abc: any; // (data type can be used in abc variable. dont use any all time).
Important:
- npm i typescript g //(to install typescript)
- tsc - h //(help typescript)
- tsc abc.ts //(to run typescript. it now creates abc.js file . equivalent file code)
- tsc -v //(check version)
- ng --version (angular cli info-> angular cli version, node, os)
- overall angular application, we use angular cli. angular cli use webpack (like task runner, module bundler).
-ng equivalent to angular 2, 4, 5, 6
# Task runner -> small task like minify, file concatenate.
# Web pack -> modules bundle and make file
Comments
Post a Comment