Hello community,
I have encountered a problem when trying to retrieve a value from custom angular component as a string. How would one tackle this task?
@Input(); @CrtInput(); token! : string; ngAfterViewInit(){ console.log(token); //token is undefined here. }
return { viewConfigDiff: /**SCHEMA_VIEW_CONFIG_DIFF*/[ { "operation": "insert", "name": "WebphoneName", "values": { "type": "test.Webphone", "token": "$token" }, "parentName": "MainContainer", "propertyName": "items", "index": 0 } ]/**SCHEMA_VIEW_CONFIG_DIFF*/, viewModelConfigDiff: /**SCHEMA_VIEW_MODEL_CONFIG_DIFF*/[ { operation: "merge", path: ["attributes"], values: { token: { value: "default value", }, }, }, ]/**SCHEMA_VIEW_MODEL_CONFIG_DIFF*/, modelConfigDiff: /**SCHEMA_MODEL_CONFIG_DIFF*/[]/**SCHEMA_MODEL_CONFIG_DIFF*/, handlers: /**SCHEMA_HANDLERS*/[ { request: "crt.HandleViewModelInitRequest", handler: async (request, next) => { request.$context.token = "21344" return next?.handle(request); } } ]/**SCHEMA_HANDLERS*/, converters: /**SCHEMA_CONVERTERS*/{}/**SCHEMA_CONVERTERS*/, validators: /**SCHEMA_VALIDATORS*/{}/**SCHEMA_VALIDATORS*/ };
Like
0 comments