Skip to content

Commit 9ab109a

Browse files
fix(create-analog): fix app component in templates
1 parent 606a720 commit 9ab109a

File tree

16 files changed

+28
-28
lines changed

16 files changed

+28
-28
lines changed

packages/create-analog/template-blog/src/app/app.spec.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,18 @@ import { TestBed } from '@angular/core/testing';
22
import { provideRouter } from '@angular/router';
33
import { provideLocationMocks } from '@angular/common/testing';
44

5-
import { AppComponent } from './app';
5+
import { App } from './app';
66

7-
describe('AppComponent', () => {
7+
describe('App', () => {
88
beforeEach(async () => {
99
await TestBed.configureTestingModule({
10-
imports: [AppComponent],
10+
imports: [App],
1111
providers: [provideRouter([]), provideLocationMocks()],
1212
}).compileComponents();
1313
});
1414

1515
it('should create the app', () => {
16-
const fixture = TestBed.createComponent(AppComponent);
16+
const fixture = TestBed.createComponent(App);
1717
const app = fixture.componentInstance;
1818
expect(app).toBeTruthy();
1919
});

packages/create-analog/template-blog/src/app/app.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,4 @@ import { RouterLink, RouterOutlet } from '@angular/router';
2525
}
2626
`,
2727
})
28-
export class AppComponent {}
28+
export class App {}

packages/create-analog/template-blog/src/app/pages/blog/[slug].page.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@ import PostAttributes from '../../post-attributes';
2121
}
2222
`,
2323
})
24-
export default class BlogPostComponent {
24+
export default class BlogPost {
2525
readonly post$ = injectContent<PostAttributes>('slug');
2626
}

packages/create-analog/template-blog/src/app/pages/blog/index.page.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,6 @@ import PostAttributes from '../../post-attributes';
3030
}
3131
`,
3232
})
33-
export default class BlogComponent {
33+
export default class Blog {
3434
readonly posts = injectContentFiles<PostAttributes>();
3535
}

packages/create-analog/template-blog/src/main.server.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import 'zone.js/node';
22
import '@angular/platform-server/init';
33
import { render } from '@analogjs/router/server';
44

5-
__APP_COMPONENT_IMPORT__
5+
import { App } from './app/app';
66
import { config } from './app/app.config.server';
77

8-
export default render(__APP_COMPONENT__, config);
8+
export default render(App, config);
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import 'zone.js';
22
import { bootstrapApplication } from '@angular/platform-browser';
33

4-
__APP_COMPONENT_IMPORT__
4+
import { App } from './app/app';
55
import { appConfig } from './app/app.config';
66

7-
bootstrapApplication(__APP_COMPONENT__, appConfig);
7+
bootstrapApplication(App, appConfig);

packages/create-analog/template-latest/src/app/app.spec.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,18 @@ import { TestBed } from '@angular/core/testing';
22
import { provideRouter } from '@angular/router';
33
import { provideLocationMocks } from '@angular/common/testing';
44

5-
import { AppComponent } from './app';
5+
import { App } from './app';
66

7-
describe('AppComponent', () => {
7+
describe('App', () => {
88
beforeEach(async () => {
99
await TestBed.configureTestingModule({
10-
imports: [AppComponent],
10+
imports: [App],
1111
providers: [provideRouter([]), provideLocationMocks()],
1212
}).compileComponents();
1313
});
1414

1515
it('should create the app', () => {
16-
const fixture = TestBed.createComponent(AppComponent);
16+
const fixture = TestBed.createComponent(App);
1717
const app = fixture.componentInstance;
1818
expect(app).toBeTruthy();
1919
});

packages/create-analog/template-latest/src/app/app.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ import { RouterOutlet } from '@angular/router';
1414
}
1515
`,
1616
})
17-
export class AppComponent {}
17+
export class App {}

packages/create-analog/template-latest/src/app/pages/analog-welcome.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,7 @@ import { Component } from '@angular/core';
257257
})
258258
export class AnalogWelcome {
259259
count = 0;
260+
260261
increment() {
261262
this.count++;
262263
}

packages/create-analog/template-latest/src/app/pages/index.page.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,4 @@ import { AnalogWelcome } from './analog-welcome';
99
<app-analog-welcome/>
1010
`,
1111
})
12-
export default class HomeComponent {
13-
}
12+
export default class Home {}

0 commit comments

Comments
 (0)