Skip to content

Commit fddfa91

Browse files
authored
Merge pull request #2 from Sridhar-Karunakaran/master
Resolving sample breaking issue
2 parents 36647f2 + 64ef75b commit fddfa91

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

server.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { APP_BASE_HREF } from '@angular/common';
2-
import { CommonEngine } from '@angular/ssr';
2+
import { CommonEngine } from '@angular/ssr/node';
33
import express from 'express';
44
import { fileURLToPath } from 'node:url';
55
import { dirname, join, resolve } from 'node:path';
@@ -37,8 +37,8 @@ export function app(): express.Express {
3737
publicPath: browserDistFolder,
3838
providers: [{ provide: APP_BASE_HREF, useValue: baseUrl }],
3939
})
40-
.then((html) => res.send(html))
41-
.catch((err) => next(err));
40+
.then((html: any) => res.send(html))
41+
.catch((err: any) => next(err));
4242
});
4343

4444
return server;

src/main.server.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
import { bootstrapApplication } from '@angular/platform-browser';
1+
import { bootstrapApplication, BootstrapContext } from '@angular/platform-browser';
22
import { AppComponent } from './app/app.component';
33
import { config } from './app/app.config.server';
44

5-
const bootstrap = () => bootstrapApplication(AppComponent, config);
5+
const bootstrap = (context?: BootstrapContext) =>
6+
bootstrapApplication(AppComponent, config, context);
67

78
export default bootstrap;

0 commit comments

Comments
 (0)