From 051cd629d004f64a51531daf687335d6047792b1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Mehmet=20=C3=87etin?=
<92744169+mehmetcetin01140@users.noreply.github.com>
Date: Mon, 18 Dec 2023 15:37:33 +0300
Subject: [PATCH 1/3] stackblitz service provider fix
---
src/app/showcase/doc/table/virtualscrolllazydoc.ts | 5 +++++
src/app/showcase/layout/doc/codeeditor/templates.ts | 4 ++--
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/src/app/showcase/doc/table/virtualscrolllazydoc.ts b/src/app/showcase/doc/table/virtualscrolllazydoc.ts
index ac335404988..7fdc9c34a56 100644
--- a/src/app/showcase/doc/table/virtualscrolllazydoc.ts
+++ b/src/app/showcase/doc/table/virtualscrolllazydoc.ts
@@ -139,6 +139,11 @@ import { LazyLoadEvent } from 'primeng/api';
import { Car } from '../../domain/car';
import { CarService } from '../../service/carservice';
+interface Column {
+ field: string;
+ header: string;
+}
+
@Component({
selector: 'table-virtual-scroll-lazy-demo',
templateUrl: 'table-virtual-scroll-lazy-demo.html'
diff --git a/src/app/showcase/layout/doc/codeeditor/templates.ts b/src/app/showcase/layout/doc/codeeditor/templates.ts
index d510f94b7f6..6e7a5339a96 100644
--- a/src/app/showcase/layout/doc/codeeditor/templates.ts
+++ b/src/app/showcase/layout/doc/codeeditor/templates.ts
@@ -489,7 +489,7 @@ const getAngularApp = (props: Props = {}) => {
const serviceImports = code.service ? getServiceImports(code.service) : '';
const routerModule = code.routerModule ? code.routerModule : `RouterModule.forRoot([{ path: '', component: ${componentName} }])`;
const declarations = routeFiles && routeFiles.length ? (componentName ? routeFiles.map((r) => r.name).join(', ') + ',' + componentName : routeFiles.map((r) => r.name).join(', ')) : `${componentName}`;
-
+ const providers = ['MessageService', ...(code.service ? [code.service] : [])];
const app_module_ts = `import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
@@ -696,7 +696,7 @@ ${serviceImports}
${routerModule}],
declarations: [ ${declarations} ],
bootstrap: [ ${componentName} ],
- providers: [ MessageService ]
+ providers: [ ${providers} ]
})
export class AppModule {}`;
From e4eeeb6df7ec82f2b030fe668ead5cae3cfef43d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Mehmet=20=C3=87etin?=
<92744169+mehmetcetin01140@users.noreply.github.com>
Date: Mon, 18 Dec 2023 17:52:02 +0300
Subject: [PATCH 2/3] carousel doc update completed
---
src/app/showcase/doc/carousel/basicdoc.ts | 23 +++--
src/app/showcase/doc/carousel/circulardoc.ts | 25 +++---
src/app/showcase/doc/carousel/numscrolldoc.ts | 25 +++---
.../showcase/doc/carousel/responsivedoc.ts | 25 +++---
src/app/showcase/doc/carousel/templatedoc.ts | 83 +++++++++----------
src/app/showcase/doc/carousel/verticaldoc.ts | 26 +++---
6 files changed, 96 insertions(+), 111 deletions(-)
diff --git a/src/app/showcase/doc/carousel/basicdoc.ts b/src/app/showcase/doc/carousel/basicdoc.ts
index 57888bdd99b..54fc2190bae 100644
--- a/src/app/showcase/doc/carousel/basicdoc.ts
+++ b/src/app/showcase/doc/carousel/basicdoc.ts
@@ -20,9 +20,9 @@ import { ProductService } from '../../service/productservice';
{{ product.name }}
{{ '$' + product.price }}
-
@@ -86,16 +86,15 @@ export class BasicDoc implements OnInit {
{{ product.name }}
{{ '$' + product.price }}
-
`,
- html: `
-
+ html: `
@@ -106,10 +105,10 @@ export class BasicDoc implements OnInit {
{{ product.name }}
{{ '$' + product.price }}
-
+
diff --git a/src/app/showcase/doc/carousel/circulardoc.ts b/src/app/showcase/doc/carousel/circulardoc.ts
index e2a8c60af95..b592738acc1 100644
--- a/src/app/showcase/doc/carousel/circulardoc.ts
+++ b/src/app/showcase/doc/carousel/circulardoc.ts
@@ -20,9 +20,9 @@ import { ProductService } from '../../service/productservice';
{{ product.name }}
{{ '$' + product.price }}
-
@@ -86,16 +86,15 @@ export class CircularDoc implements OnInit {
{{ product.name }}
{{ '$' + product.price }}
-
+
`,
- html: `
-
+ html: `
@@ -106,10 +105,10 @@ export class CircularDoc implements OnInit {
{{ product.name }}
{{ '$' + product.price }}
-
+
diff --git a/src/app/showcase/doc/carousel/numscrolldoc.ts b/src/app/showcase/doc/carousel/numscrolldoc.ts
index fbf6166d945..34c43bfb0f7 100644
--- a/src/app/showcase/doc/carousel/numscrolldoc.ts
+++ b/src/app/showcase/doc/carousel/numscrolldoc.ts
@@ -20,9 +20,9 @@ import { ProductService } from '../../service/productservice';
{{ product.name }}
{{ '$' + product.price }}
-
@@ -86,16 +86,15 @@ export class NumScrollDoc implements OnInit {
{{ product.name }}
{{ '$' + product.price }}
-
+
`,
- html: `
-
+ html: `
@@ -106,10 +105,10 @@ export class NumScrollDoc implements OnInit {
{{ product.name }}
{{ '$' + product.price }}
-
+
diff --git a/src/app/showcase/doc/carousel/responsivedoc.ts b/src/app/showcase/doc/carousel/responsivedoc.ts
index 7d7df97282e..d77d4109108 100644
--- a/src/app/showcase/doc/carousel/responsivedoc.ts
+++ b/src/app/showcase/doc/carousel/responsivedoc.ts
@@ -25,9 +25,9 @@ import { ProductService } from '../../service/productservice';
{{ product.name }}
{{ '$' + product.price }}
-
@@ -93,17 +93,16 @@ export class ResponsiveDoc implements OnInit {
{{ product.name }}
{{ '$' + product.price }}
-
+
`,
- html: `
-
+ html: `
@@ -115,10 +114,10 @@ export class ResponsiveDoc implements OnInit {
{{ product.name }}
{{ '$' + product.price }}
-
+
diff --git a/src/app/showcase/doc/carousel/templatedoc.ts b/src/app/showcase/doc/carousel/templatedoc.ts
index 92ff8687e7b..fe1feb964fc 100644
--- a/src/app/showcase/doc/carousel/templatedoc.ts
+++ b/src/app/showcase/doc/carousel/templatedoc.ts
@@ -23,9 +23,9 @@ import { ProductService } from '../../service/productservice';
{{ product.name }}
{{ '$' + product.price }}
-
@@ -87,20 +87,17 @@ export class TemplateDoc implements OnInit {
Header content
-
-
-
-
-
-
-
{{ product.name }}
-
{{ product.price }}
-
-
+
+
+
+
+
+
{{ product.name }}
+
{{ '$' + product.price }}
+
+
@@ -109,35 +106,31 @@ export class TemplateDoc implements OnInit {
Footer content
`,
- html: `
-
-
-
- Header content
-
-
-
-
-
-
-
-
-
{{ product.name }}
-
{{ product.price }}
-
-
-
-
+ html: `
+
+
+ Header content
+
+
+
+
+
+
+
+
{{ product.name }}
+
{{ '$' + product.price }}
+
+
-
-
- Footer content
-
-
+
+
+
+
+ Footer content
+
+
`,
typescript: `
import { Component, OnInit } from '@angular/core';
diff --git a/src/app/showcase/doc/carousel/verticaldoc.ts b/src/app/showcase/doc/carousel/verticaldoc.ts
index 94ee75d1470..17924e98bb2 100644
--- a/src/app/showcase/doc/carousel/verticaldoc.ts
+++ b/src/app/showcase/doc/carousel/verticaldoc.ts
@@ -21,10 +21,9 @@ import { ProductService } from '../../service/productservice';
{{ product.name }}
{{ product.price }}
-
@@ -70,18 +69,16 @@ export class VerticalDoc implements OnInit {
{{product.name}}
{{product.price}}
-
+
`,
- html: `
-
+ html: `
@@ -93,10 +90,9 @@ export class VerticalDoc implements OnInit {
{{product.name}}
{{product.price}}
-
From 1276507340bcffad3e140846e98b1fb2ab4e7366 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Mehmet=20=C3=87etin?=
<92744169+mehmetcetin01140@users.noreply.github.com>
Date: Mon, 18 Dec 2023 18:02:59 +0300
Subject: [PATCH 3/3] stackblitz providers updated
---
src/app/showcase/layout/doc/codeeditor/templates.ts | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/app/showcase/layout/doc/codeeditor/templates.ts b/src/app/showcase/layout/doc/codeeditor/templates.ts
index 6e7a5339a96..3ce6d9bef4e 100644
--- a/src/app/showcase/layout/doc/codeeditor/templates.ts
+++ b/src/app/showcase/layout/doc/codeeditor/templates.ts
@@ -489,7 +489,8 @@ const getAngularApp = (props: Props = {}) => {
const serviceImports = code.service ? getServiceImports(code.service) : '';
const routerModule = code.routerModule ? code.routerModule : `RouterModule.forRoot([{ path: '', component: ${componentName} }])`;
const declarations = routeFiles && routeFiles.length ? (componentName ? routeFiles.map((r) => r.name).join(', ') + ',' + componentName : routeFiles.map((r) => r.name).join(', ')) : `${componentName}`;
- const providers = ['MessageService', ...(code.service ? [code.service] : [])];
+ const providers = code.service && code.service.length ? code.service.map((s) => s).join(', ') : '';
+
const app_module_ts = `import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';