File tree Expand file tree Collapse file tree 3 files changed +6
-12
lines changed
packages/schematics/angular/application/files
tests/legacy-cli/e2e/assets/17.0-project/src/app Expand file tree Collapse file tree 3 files changed +6
-12
lines changed Original file line number Diff line number Diff line change 1
- import { Component } from '@angular/core';
1
+ import { Component, signal } from '@angular/core';
2
2
3
3
@Component({
4
4
selector: '<%= selector %>',<% if(inlineTemplate) { %>
5
5
template: `
6
- <h1>Welcome to {{title}}!</h1>
6
+ <h1>Welcome to {{ title() }}!</h1>
7
7
8
8
<% if (routing) {
9
9
%><router-outlet /><%
@@ -15,5 +15,5 @@ import { Component } from '@angular/core';
15
15
styleUrl: './app.<%= style %>'<% } %>
16
16
})
17
17
export class App {
18
- protected title = '<%= name %>';
18
+ protected readonly title = signal( '<%= name %>') ;
19
19
}
Original file line number Diff line number Diff line change 1
- import { Component } from '@angular/core';<% if(routing) { %>
1
+ import { Component, signal } from '@angular/core';<% if(routing) { %>
2
2
import { RouterOutlet } from '@angular/router';<% } %>
3
3
4
4
@Component({
5
5
selector: '<%= selector %>',
6
6
imports: [<% if(routing) { %>RouterOutlet<% } %>],<% if(inlineTemplate) { %>
7
7
template: `
8
- <h1>Welcome to {{title}}!</h1>
8
+ <h1>Welcome to {{ title() }}!</h1>
9
9
10
10
<% if (routing) {
11
11
%><router-outlet /><%
@@ -16,5 +16,5 @@ import { RouterOutlet } from '@angular/router';<% } %>
16
16
styleUrl: './app.<%= style %>'<% } %>
17
17
})
18
18
export class App {
19
- protected title = '<%= name %>';
19
+ protected readonly title = signal( '<%= name %>') ;
20
20
}
Original file line number Diff line number Diff line change @@ -14,12 +14,6 @@ describe('AppComponent', () => {
14
14
expect ( app ) . toBeTruthy ( ) ;
15
15
} ) ;
16
16
17
- it ( `should have the 'seventeen-project' title` , ( ) => {
18
- const fixture = TestBed . createComponent ( AppComponent ) ;
19
- const app = fixture . componentInstance ;
20
- expect ( app . title ) . toEqual ( 'seventeen-project' ) ;
21
- } ) ;
22
-
23
17
it ( 'should render title' , ( ) => {
24
18
const fixture = TestBed . createComponent ( AppComponent ) ;
25
19
fixture . detectChanges ( ) ;
You can’t perform that action at this time.
0 commit comments