Hi Team I want to use GoodData UI in my angular AP...
# gd-beginners
g
Hi Team I want to use GoodData UI in my angular APP my application is developed in Angular 10 and I want to use react component to show the dashboard, insights into my angular app. can you please tell me how can I integrate react component in Angular app. I am using below link but I didnt get complete steps here Link : https://sdk.gooddata.com/gooddata-ui/docs/ht_use_react_component_in_angular_2.x.html In above example they created KPI component and access it into another angular component using <app-kpi workspace="dsfkjasldkfjladksjfxxxxxx" measureId="dasfksdalf"></app-kpi> I didnt understand from where they get measureId? also my question is how can I load another graph, charts and insights in Angular app?
a
@Jiri Zajic?
d
Hi Gaurav, The easiest way would be to get the identifiers by using the Export Catalog: https://sdk.gooddata.com/gooddata-ui/docs/export_catalog.html That will download all the measures, facts, etc. from your project and save information about them into a file. Then they can import these in their component and use them. The result will looks something like this for each measure in the project:
Copy code
{
  "projectId": "workspace_ID",
  "measures": {
    "myMeasuresname": {
      "identifier": "aaRDqLCjijPN",
      "tags": ""
    },
And then you can start using the identifier.
👍 1
g
Thanks @Daniela Salmeron
@Daniela Salmeron when I extracted the details and use it into project using angular component then it shows error at the place where I included angular component. I referred the https://sdk.gooddata.com/gooddata-ui/docs/ht_use_react_component_in_angular_2.x.html this link to create angular component and include it but it shows error. please check screenshot attached
d
@GauravP can you please the source code with us? Thanks!
And can I also have the console error? or is the same as https://community.gooddata.com/gooddata-ui-60/load-gooddata-chart-using-angular-486 ?
g
I followed the steps which is given in this https://sdk.gooddata.com/gooddata-ui/docs/ht_use_react_component_in_angular_2.x.html document and created one KPI angular component and added this component into my HTML. below is the attachment
d
Thanks! Would you please add in polyfill.ts:
Copy code
(window as any).process = {
  env: { DEBUG: undefined },
};
g
ok, thanks
d
Hi @GauravP! Did it work?
g
@Daniela Salmeron Actually I am working on another task, I will try and update you
👍 1
@Daniela Salmeron I am facing below error(Browser console error while loading), please check attachment, Also I have exported catalogue and downloaded all information and use this information in my Angular component, please check attachment 2
In the black image, I have added component with Workspace id and measureId which I got from downloaded file after export catalogue, please tell me what I made wrong here?
this is my exported catalogue file which content Workspace ID and measure id, and I have used this as per the document
Is there any update?
d
Hi Gaurav, Sorry for my late reply, I was on vacation. I see that this is due to a CORS issue. Please check and follow this guide on how to solve it: https://sdk.gooddata.com/gooddata-ui/docs/platform_cors.html
g
ok I will check