Module 2.pptx Angular JS FRAMEWORK WEBDEVELOPMENT

raman76530 3 views 23 slides Feb 26, 2025
Slide 1
Slide 1 of 23
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19
Slide 20
20
Slide 21
21
Slide 22
22
Slide 23
23

About This Presentation

hdhsdh


Slide Content

Angular Module 2 - Introduction to Typescript

Learning Objectives What is Typescript? What is a Variable? Data Types Arrays Enum Function Classes in Typescript Inheritance Getter & Setter Interfaces Decorators

What is Typescript? Typescript is a superset of JavaScript. TypeScript is strongly typed, whereas JavaScript is dynamically typed. TypeScript allows to specify the datatype explicitly. Typescript helps the user to write the JavaScript more easier with advanced features. TypeScript cannot be directly executed by browsers like JavaScript. Instead TypeScript code is compiled to get JavaScript code.

What is Typescript?

What is a Variable? Named storage to store a value In typescript, the variables are strongly typed

Datatypes String Use backticks ` mystring ` - used to write an expression E ven we can use variables ${var} using backticks (Template reference syntax) Number Boolean

Arrays

Enum

Function

Function

Arrow Function Arrow functions have become the standard syntax in modern JavaScript. They offer a concise way to write functions, making your code lighter and more readable

Class in Typescript

Class in Typescript

Class in Typescript

Class in Typescript

Method Overriding

Getter & Setter Getter will help the private members to be accessed outside the class. We use get keyword Setter will help us to set the value of the private member using set keyword.

Interface An interface in TypeScript defines the expected structure of an object. It provides a way to describe the shape of objects, including their properties and methods, without implementing any functionality.

Why Interface? Improved Type Checking Easier to understand and maintain the code. Interfaces can be extended and reused across different parts of the code.

Interface using Arrow functions

Multiple Inheritance

Decorators It is a powerful feature in Typescript which helps to add functionality or modify the behavior of classes, methods, properties and parameters at runtime. They are functions declared using @ symbol.

End of Module 2 Queries?
Tags