From 65cc1a0a115e2a2198d17953c4112240752ab0ac Mon Sep 17 00:00:00 2001 From: Mathias Boeck Date: Fri, 15 Nov 2024 09:42:33 +0100 Subject: [PATCH] docs: adjust tutorials angular app no routing (#249) --- TUTORIALS.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/TUTORIALS.md b/TUTORIALS.md index 3a047742..863cd741 100644 --- a/TUTORIALS.md +++ b/TUTORIALS.md @@ -15,7 +15,7 @@ npm install -g @angular/cli@ - Then run: ``` -ng new project-tutorial-map --style=scss --standalone=true +ng new project-tutorial-map --style=scss --standalone=true --routing=false ``` - We do not need angular routing, so decline the prompt with `N` @@ -35,12 +35,14 @@ npm install @cds/core@ @clr/angular@ @clr/ui@ - Add the Clarity module and others to app.config.ts: ``` import { ApplicationConfig, importProvidersFrom } from '@angular/core'; +... import { ClarityModule } from '@clr/angular'; import { provideAnimations } from '@angular/platform-browser/animations'; import { BrowserModule } from '@angular/platform-browser'; export const appConfig: ApplicationConfig = { providers: [ + ... importProvidersFrom(BrowserModule, ClarityModule), provideAnimations() ] @@ -118,6 +120,8 @@ import { OsmTileLayer, EocLitemap, BlueMarbleTile, EocLiteoverlayTile } from '@d ... +@Component({ +... providers: [LayersService, MapStateService, MapOlService], standalone: true, imports: [ @@ -126,7 +130,8 @@ imports: [ LayerControlComponent, BaseLayerControlComponent ] - +... +}) ... controls!: IMapControls;