File tree Expand file tree Collapse file tree 6 files changed +7
-24
lines changed
libs/frontend/root/src/root Expand file tree Collapse file tree 6 files changed +7
-24
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,9 @@ This project is a Angular (With SSR) + Nestjs monorepo using Nx. It is a full-st
8
8
Feel free to contribute to this project by creating a pull request.
9
9
10
10
- [ ] Check on how to build for bun runtime
11
- - [ ] Pre rendering routes doesn't spin up the server, so the HTTP calls are not made.
11
+ - [ ] Pre rendering routes doesn't spin up the server, so the HTTP calls are not working.
12
+ - Wouraround: Use full api url's (http://localhost:4200/api ) instead of relative url's (/api)
13
+ - And spin up the api before building
12
14
- [ ] Create a material included starter
13
15
14
16
## Directory Structure
Original file line number Diff line number Diff line change 37
37
" class-validator"
38
38
],
39
39
"scripts" : [],
40
- "prerender" : false ,
40
+ "prerender" : true ,
41
41
"ssr" : {
42
42
"entry" : " apps/app/server/server.ts"
43
43
}
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1
1
import { bootstrapApplication } from '@angular/platform-browser' ;
2
2
import { RootComponent , config } from '@app/frontend-root' ;
3
-
4
3
const bootstrap = ( ) => bootstrapApplication ( RootComponent , config ) ;
5
4
6
5
export default bootstrap ;
6
+
Original file line number Diff line number Diff line change 1
1
< h1 > Welcome app!</ h1 >
2
2
3
- <!-- < pre>{{ movie() | json }}</pre> -- >
3
+ < pre > {{ movie() | json }}</ pre >
4
4
5
5
< router-outlet > </ router-outlet >
Original file line number Diff line number Diff line change @@ -13,5 +13,5 @@ import { derivedAsync } from 'ngxtension/derived-async';
13
13
} )
14
14
export class RootComponent {
15
15
private readonly httpClient = inject ( HttpClient ) ;
16
- // movie = derivedAsync(() => this.httpClient.get(`/api/backend-test`));
16
+ movie = derivedAsync ( ( ) => this . httpClient . get ( `/api/backend-test` ) ) ;
17
17
}
You can’t perform that action at this time.
0 commit comments