angular2-jsonapi
angular2-jsonapi copied to clipboard
Can't resolve all parameters for ... This will become an error in Angular v6.x
Warning: Can't resolve all parameters for Activities in src/app/core/models/activities.model.ts: ([object Object], ?). This will become an error in Angular v6.x
I'm using Angular CLI 1.6.6 and Angular 5.2.2. This warning occurs running build with -aot
option. I see the JsonApiModel implementation and his constructor receive two parameters that are omited when I extend it.
I think that I need to write the child class constructor with super()
, suppling with the same kind of parameters. But... how?
~I found this workaround - maybe is not a workaround, but the correct way - to extend and avoid the warning~
@Injectable()
@JsonApiModelConfig({
type: 'activities'
})
export class Activities extends JsonApiModel {
constructor(
datastore: JsonApiDatastore,
data: any
) {
super(datastore, data);
}
@Attribute()
name: string;
@Attribute()
active: boolean;
}
But I'm not sure about this solution. Can anybody help me?
Hey men? Can somebody help-me? This issue still exist on 6.1.1-beta
Still exist on 6.1.2...