Skip to content

Commit

Permalink
chore: update to use setAssetPath
Browse files Browse the repository at this point in the history
  • Loading branch information
omarkawach committed Oct 21, 2024
1 parent e725d65 commit bfd9420
Showing 1 changed file with 5 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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();
}
Expand Down

0 comments on commit bfd9420

Please sign in to comment.