Angular Basics 1
Angular Basics 1
Angular history:
Angular JS was introduced in 2010
Angular 2 was introduced in 2016
Angular 4,5,6,7 were various versions introduced in late 2016.
Angular 8 was inMay 2019
Angular 9 in Feb 2020
Angular 10 in Jun 2020
Types of App:
Console
Desktop
Web
What is Angular??
---------------
Angular is a clientside framework used to develop webapp[SPA]
using HTML & TypeScript
setup
s/w requirements
1)Visual Studio Code [Editor]
https://code.visualstudio.com
version
3)install typescript
open node terminal
open C:\Users\<UserName>
npm install -g typescript
what is npm??
------------
npm stands for node package manager
node utility for installing s/w from net
_______________________________________
steps:-
open VS Code Editor--->open folder ---->type Typescript
code[file.ts]--->compile & execute
tsc *.ts
here typescript code will be compiled to js code by typescrpt compiler
node *.js
here javascript code will be executed by the node
TypeScript
-----------
-Typescript is a open source prog lang developed by Microsoft
-parent lang/super set of JavaScript
-strongly typed
[we have to specify the datatype for a variable]
in C, int i;
Hello.ts[typescript code]
***
AngularJS is first version --uses HTML+Javascript
Angular ---->uses HTML+Typescript
**Declaring a variable in TS
-----------------------------
let variable:datatype=value
eg:-
let rollno:number=10;
let msg:string="Hello";
let status:boolean=false;
let num1:number=10,num2:number=20;
let result:any; just like var result;
LAB)
1)cp,sp print profit or loss