Ali Ylmaz

Ali Ylmaz

  • NA
  • 129
  • 10.6k

Angular Create Class

Nov 10 2021 7:24 AM

Hi

I created class in angular 12. But when I want to call this class from a different component,

I get an error.

What is the solution to this?

Error :  Cannot assign to 'Kisiler' because it is an import.

 Cannot find name 'KisiBilgisi'.

 

Kisiler Class

export class Kisiler {  
    CustomerCode: string;
    password: string;
    email: string;
    firstName: string;
    lastName: number;


    constructor(CustomerCode:string, password: string, email:string,firstName:string,lastName:string)
    {
      this.CustomerCode=CustomerCode;
      this.password=password;
      this.email=email;
      this.firstName=firstName;
      this.lastName=lastName;
    }
  }
  

 


Answers (4)