From bfd942039ccb3e198a7f6eac9487045ccec98055 Mon Sep 17 00:00:00 2001 From: Omar Kawach Date: Mon, 21 Oct 2024 11:48:03 -0700 Subject: [PATCH] chore: update to use setAssetPath --- .../samples/angular/src/app/app.component.ts | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/component-samples/coding-components/samples/angular/src/app/app.component.ts b/component-samples/coding-components/samples/angular/src/app/app.component.ts index 50ba7199c..0dcfad343 100644 --- a/component-samples/coding-components/samples/angular/src/app/app.component.ts +++ b/component-samples/coding-components/samples/angular/src/app/app.component.ts @@ -4,12 +4,12 @@ import { RouterOutlet } from "@angular/router"; import { loadData } from "../functions/load-data.service"; import { IEditorProfileDefinition, IPredefinedProfile } from "@arcgis/coding-components/dist/types/utils/profile/types"; import { IEditorTestContext } from "@arcgis/coding-components/dist/types/utils/arcade-executor"; -import { defineCustomElements as defineCalciteElements } from "@esri/calcite-components/dist/loader"; -import { defineCustomElements as defineCodingElements } from "@arcgis/coding-components/dist/loader"; -// Calcite Components -// import "@esri/calcite-components/dist/components/calcite-scrim"; -// import "@arcgis/coding-components/dist/components/arcgis-arcade-editor"; +import { setAssetPath } from "@esri/calcite-components/dist/components"; +setAssetPath("https://js.arcgis.com/calcite-components/2.8.6/assets"); + +import "@esri/calcite-components/dist/components/calcite-scrim"; +import "@arcgis/coding-components/dist/components/arcgis-arcade-editor"; @Component({ selector: "app-root", @@ -30,9 +30,6 @@ export class AppComponent implements OnInit { public testData!: IEditorTestContext; ngOnInit() { - // define custom elements in the browser, and load the assets from the CDN - defineCalciteElements(window, { resourcesUrl: "https://js.arcgis.com/calcite-components/2.8.6/assets" }); - defineCodingElements(window, { resourcesUrl: "https://js.arcgis.com/coding-components/4.30/assets" }); // Call async functions here this.fetch(); }