Hi Team,
We have migrated our UI code from v8 to v10.2.11.
After migration, we are getting framework error in Angular component. “framework does not exists” error.
Below is the code line from v10 where we are getting an error.
this.framework.metadata.flex.components.get()
Could you please here.
Thanks in Advance.
Hi Sandip,
have you checked the migration information for v10 in the dev portal?
Framework doesn’t exist anymore in v10 - the functionality has been moved to UI Services (Authentication Portal)
You need to import it:
import {
inject
} from ‘@angular/core’;
import {
ComponentMetadataService
} from ‘cmf-core’;
Then in your component you need to inject the service (depending on what you are doing you may need to also add the service into the providers in the component decorator) like this:
protected componentMetadataService = inject(ComponentMetadataService);
and then you can use it as before:
this.componentMetadataService.get(“yourFlexComponentId”)
Similar for all the other services (LBO, Navigation, Util, etc)
All the best,
Maximilian
Thanks, Maximilian, for your suggestion. It helped !We have tried above solution, and we are able to fetch component value with the property [componentMetadataService] provided Instead of framework property.We are using above component value in the function applyCustomization().Inside above function, we have below line of code :const stepComponents = view._view.nodes.filter(node => node && node.instance && node.instance.type === ‘Component’) as any;Due to upgrade to Angular 15+, we can’t access view._view.nodes—as its no longer available. So, the variable step component is used multiple times in the code.Could you please help here if possible with alternate code. Your help would be appreciated.Thanks,Sandip Dhakane