Skip to content
This repository was archived by the owner on Dec 8, 2022. It is now read-only.

Commit a0d5ebd

Browse files
Merge branch 'master' into child-routes
2 parents c3d5c7b + adc8fa3 commit a0d5ebd

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

lib/sky-pages-route-generator.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -115,9 +115,10 @@ function generateRoutes(skyAppConfig) {
115115
});
116116

117117
if (skyAppConfig.runtime.handle404) {
118+
const err = `<sky-error errorType="notfound"></sky-error>`;
118119
entities.push({
119120
componentName: 'NotFoundComponent',
120-
componentDefinition: `@Component({ template: '404' }) export class NotFoundComponent { }`,
121+
componentDefinition: `@Component({ template: '${err}' }) export class NotFoundComponent { }`,
121122
routePath: ['**'],
122123
routeParams: []
123124
});

test/sky-pages-module-generator.spec.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ describe('SKY UX Builder module generator', () => {
2323
runtime: runtimeUtils.getDefaultRuntime(),
2424
skyux: {}
2525
});
26-
expect(source).toContain("template: '404'");
26+
expect(source).toContain("template: '<sky-error errorType=\"notfound\"></sky-error>'");
2727
});
2828

2929
it('should not add the NotFoundComponent if it exists', () => {
@@ -39,7 +39,7 @@ describe('SKY UX Builder module generator', () => {
3939
skyux: {}
4040
});
4141
expect(source).toContain('NotFoundComponent');
42-
expect(source).not.toContain("template: '404'");
42+
expect(source).not.toContain("template: '<sky-error errorType=\"notfound\"></sky-error>'");
4343
});
4444

4545
it('should allow the SKY UX Builder out alias to be overridden', () => {

0 commit comments

Comments
 (0)