Quantcast
Channel: Angular: Difference between Export and Public Class? - Stack Overflow
Viewing all articles
Browse latest Browse all 2

Angular: Difference between Export and Public Class?

$
0
0

In Angular, what is the difference between an export class, and a public class?

"Angular imports/exports are used to make the content of one module available to be used in another module. So how is this different from a public class?"

Reference question:What is the exact meaning of export keyword in Angular 2\TypeScript?

Example:

export class Product {constructor(public id?: number,public name?: string,public category?: string,public description?: string,public price?: number) { }}

Viewing all articles
Browse latest Browse all 2

Latest Images

Trending Articles





Latest Images