From 4e06332190c178fb7cbee19117bf65c27bba74ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mehmet=20=C3=87etin?= <92744169+mehmetcetin01140@users.noreply.github.com> Date: Wed, 26 Jun 2024 12:43:05 +0300 Subject: [PATCH] Fixed #15902 - PrimeNG Button Link stackblitz not working --- src/app/showcase/layout/doc/codeeditor/templates.ts | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/app/showcase/layout/doc/codeeditor/templates.ts b/src/app/showcase/layout/doc/codeeditor/templates.ts index edae9b5d197..5a5fd4d99b7 100644 --- a/src/app/showcase/layout/doc/codeeditor/templates.ts +++ b/src/app/showcase/layout/doc/codeeditor/templates.ts @@ -737,12 +737,15 @@ const getAngularApp = (props: Props = {}) => { `; const main_ts = `import { bootstrapApplication } from '@angular/platform-browser'; - import { ${componentName} } from './app/${selector}'; - import { provideAnimationsAsync } from '@angular/platform-browser/animations/async'; +import { ${componentName} } from './app/${selector}'; +import { provideAnimationsAsync } from '@angular/platform-browser/animations/async'; +import { Routes, provideRouter } from '@angular/router'; - bootstrapApplication(${componentName}, { - providers: [provideAnimationsAsync()], - }).catch((err) => console.error(err));`; +const routes: Routes = []; + +bootstrapApplication(${componentName}, { +providers: [provideAnimationsAsync(), provideRouter(routes)], +}).catch((err) => console.error(err));`; const defaultFiles = { 'src/main.ts': { content: main_ts },