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';
22
33@Component({
44 selector: '<%= selector %>',<% if(inlineTemplate) { %>
55 template: `
6- <h1>Welcome to {{title}}!</h1>
6+ <h1>Welcome to {{ title() }}!</h1>
77
88 <% if (routing) {
99 %><router-outlet /><%
@@ -15,5 +15,5 @@ import { Component } from '@angular/core';
1515 styleUrl: './app.<%= style %>'<% } %>
1616})
1717export class App {
18- protected title = '<%= name %>';
18+ protected readonly title = signal( '<%= name %>') ;
1919}
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) { %>
22import { RouterOutlet } from '@angular/router';<% } %>
33
44@Component({
55 selector: '<%= selector %>',
66 imports: [<% if(routing) { %>RouterOutlet<% } %>],<% if(inlineTemplate) { %>
77 template: `
8- <h1>Welcome to {{title}}!</h1>
8+ <h1>Welcome to {{ title() }}!</h1>
99
1010 <% if (routing) {
1111 %><router-outlet /><%
@@ -16,5 +16,5 @@ import { RouterOutlet } from '@angular/router';<% } %>
1616 styleUrl: './app.<%= style %>'<% } %>
1717})
1818export class App {
19- protected title = '<%= name %>';
19+ protected readonly title = signal( '<%= name %>') ;
2020}
Original file line number Diff line number Diff line change @@ -14,12 +14,6 @@ describe('AppComponent', () => {
1414 expect ( app ) . toBeTruthy ( ) ;
1515 } ) ;
1616
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-
2317 it ( 'should render title' , ( ) => {
2418 const fixture = TestBed . createComponent ( AppComponent ) ;
2519 fixture . detectChanges ( ) ;
You can’t perform that action at this time.
0 commit comments