I am working on Angular 5 application. I have model class RoleClaimEntryDataModel and in one injectable service I have method 'UpdateRoleClaimById' receiving RoleClaimEntryDataModel as parameter and I am trying to assign this object to RoleClaimEntryDataModel of class but I get error
error
Type 'RoleClainEntryDataModel' is not assignable to type 'typeof RoleClaimEntryDataModel'/
Property 'prototype' is missing in type 'RoleClaimEntryDataModel'
Model class
export class RoleClaimEntryDataModel{
roleId:string;
claimId:string;
isClaimAssignToRole:boolean;
}
Injectable Service A
@Injectable()
export class UpdateRoleClaimCommand extends BaseCommand<boolean> {
public data = RoleClaimEntryDataModel;
initialise(): void {
super.setBody(this.data);
}
}
Injectable Service B
@Injectable()
export class PermissionDataService{
constructor(
private updateRoleClaimCommand: UpdateRoleClaimCommand
){}
public UpdateRoleClaimById(roleClaimEntryDataModel: RoleClaimEntryDataModel)
{
this.updateRoleClaimCommand.data = roleClaimEntryDataModel; // throw error here
}