MCPcopy Index your code
hub / github.com/angular/angular-cli / createEntryPoint

Function createEntryPoint

packages/angular/ssr/test/app-engine_spec.ts:34–89  ·  view source on GitHub ↗
(locale: string)

Source from the content-addressed store, hash-verified

32}
33
34function createEntryPoint(locale: string) {
35 return async () => {
36 @Component({
37 selector: `app-home-${locale}`,
38 template: `Home works ${locale.toUpperCase()}`,
39 })
40 class HomeComponent {}
41
42 @Component({
43 selector: `app-ssr-${locale}`,
44 template: `SSR works ${locale.toUpperCase()}`,
45 })
46 class SSRComponent {}
47
48 @Component({
49 selector: `app-ssg-${locale}`,
50 template: `SSG works ${locale.toUpperCase()}`,
51 })
52 class SSGComponent {}
53
54 setAngularAppTestingManifest(
55 [
56 { path: 'ssg', component: SSGComponent },
57 { path: 'ssr', component: SSRComponent },
58 { path: '', component: HomeComponent },
59 ],
60 [
61 { path: 'ssg', renderMode: RenderMode.Prerender },
62 { path: '**', renderMode: RenderMode.Server },
63 ],
64 '/' + locale,
65 {
66 'ssg/index.html': {
67 size: 25,
68 hash: 'f799132d0a09e0fef93c68a12e443527700eb59e6f67fcb7854c3a60ff082fde',
69 text: async () => `<html>
70 <head>
71 <title>SSG page</title>
72 <base href="/${locale}" />
73 </head>
74 <body>
75 SSG works ${locale.toUpperCase()}
76 </body>
77 </html>
78 `,
79 },
80 },
81 locale,
82 );
83
84 return {
85 ɵgetOrCreateAngularServerApp: getOrCreateAngularServerApp,
86 ɵdestroyAngularServerApp: destroyAngularServerApp,
87 };
88 };
89}
90
91describe('AngularAppEngine', () => {

Callers 1

app-engine_spec.tsFile · 0.85

Calls 1

Tested by

no test coverage detected