O'Reilly logo

Learning Angular for .NET Developers by Rajesh Gunasundaram

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Classes

A class is an extensible template that is used to create objects with member variables to hold the state of the object and member functions that deal with the behavior of the object.

The current version of JavaScript supports only function-based and prototype-based inheritance to build reusable components. The next version of JavaScript ECMAScript 6 supports object-oriented programming by adding the syntactic sugar for prototype-based class definitions and inheritance. However, TypeScript enabled developers to write code using object-oriented programming techniques, and it compiles the code down to JavaScript, which is compatible with all browsers and platforms:

class Customer {     name: string;     constructor(name: string) {  this.name ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required