Skip to content

Commit dcb45b4

Browse files
committed
fix(@schematics/angular): fix the inline template
To be the same as the separate HTML file. Fixes #8005
1 parent 998f055 commit dcb45b4

File tree

1 file changed

+22
-4
lines changed

1 file changed

+22
-4
lines changed

packages/schematics/angular/application/other-files/app.component.ts

+22-4
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,28 @@ import { Component } from '@angular/core';
33
@Component({
44
selector: '<%= selector %>',<% if(inlineTemplate) { %>
55
template: `
6-
<p>
7-
app Works!
8-
</p><% if(routing) { %>
9-
<router-outlet></router-outlet><% } %>
6+
<!--The content below is only a placeholder and can be replaced.-->
7+
<div style="text-align:center">
8+
<h1>
9+
Welcome to {{title}}!
10+
</h1>
11+
<img width="300" src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNTAgMjUwIj4KICAgIDxwYXRoIGZpbGw9IiNERDAwMzEiIGQ9Ik0xMjUgMzBMMzEuOSA2My4ybDE0LjIgMTIzLjFMMTI1IDIzMGw3OC45LTQzLjcgMTQuMi0xMjMuMXoiIC8+CiAgICA8cGF0aCBmaWxsPSIjQzMwMDJGIiBkPSJNMTI1IDMwdjIyLjItLjFWMjMwbDc4LjktNDMuNyAxNC4yLTEyMy4xTDEyNSAzMHoiIC8+CiAgICA8cGF0aCAgZmlsbD0iI0ZGRkZGRiIgZD0iTTEyNSA1Mi4xTDY2LjggMTgyLjZoMjEuN2wxMS43LTI5LjJoNDkuNGwxMS43IDI5LjJIMTgzTDEyNSA1Mi4xem0xNyA4My4zaC0zNGwxNy00MC45IDE3IDQwLjl6IiAvPgogIDwvc3ZnPg==">
12+
</div>
13+
<h2>Here are some links to help you start: </h2>
14+
<ul>
15+
<li>
16+
<h2><a target="_blank" rel="noopener" href="https://angular.io/tutorial">Tour of Heroes</a></h2>
17+
</li>
18+
<li>
19+
<h2><a target="_blank" rel="noopener" href="https://github.com/angular/angular-cli/wiki">CLI Documentation</a></h2>
20+
</li>
21+
<li>
22+
<h2><a target="_blank" rel="noopener" href="https://blog.angular.io/">Angular blog</a></h2>
23+
</li>
24+
</ul>
25+
<% if (routing) {
26+
%><router-outlet></router-outlet><%
27+
} %>
1028
`,<% } else { %>
1129
templateUrl: './app.component.html',<% } if(inlineStyle) { %>
1230
styles: []<% } else { %>

0 commit comments

Comments
 (0)