Skip to main content

Posts

Showing posts with the label What is Parameter Property TypeScript?

Automatic Assignment of Constructor Parameters in TypeScript

What is Parameter Property TypeScript? The TypeScript has so many useful features which not have in other programming languages. The TypeScript has an automatic assignment of constructor parameters that is called “Parameter Property”. It is automatic assignment of constructor parameters to the relevant property. It is great but it is different to other languages. Stayed Informed - Angular 2 Tutorials and Examples Examples as, Declaring a class with constructor arguments in C# and other programming language as, class Customer {     _name: string ;     _age: number ;     _adrress: string ;     constructor (name: string , age: number , adrress: string ) {         this .name = _name;         this .age = _age;         this .adrress = _adrress;     } } Declaring a...