Horje
creating a class in angular Code Example
create class angular
// to create a model class, we first need to create a new file
//f.e person.ts

export class Person {
 constructor(
  public name: string,
   public lastName: string,
   public age:number
  
  ) {}
}

//now that we have the model class we can create arrays that contain Person class elements

.
.
public people: Person[];
constructor(){
 this.people = [
   new Person ('Carla','Smith', 20 ),
    new Person ('Carlos','Smith', 25 ),
    new Person ('Andrea','Johnson', 23 ),
   
   ];
}


creating a class in angular
$ ng generate class class_name
Source: angular.io




Javascript

Related
python faker json Code Example python faker json Code Example
Icons library in react Code Example Icons library in react Code Example
__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ Code Example __REDUX_DEVTOOLS_EXTENSION_COMPOSE__ Code Example
Append to the text in the <p> tag Code Example Append to the text in the <p> tag Code Example
inject firebase in angularjs Code Example inject firebase in angularjs Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
7