Skip to content

Commit 26f66fe

Browse files
authored
fix(@schematics/angular): handle the inlineTemplate case for ng new (#15324)
Update the template of `app.component.ts` when using `--inlineTemplate`.
1 parent 6dd5b18 commit 26f66fe

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,11 @@ import { Component } from '@angular/core';
44
selector: '<%= selector %>',<% if(inlineTemplate) { %>
55
template: `
66
<!--The content below is only a placeholder and can be replaced.-->
7-
<div style="text-align:center">
7+
<div style="text-align:center" class="content">
88
<h1>
99
Welcome to {{title}}!
1010
</h1>
11+
<span style="display: block">{{ title }} app is running!</span>
1112
<img width="300" alt="Angular Logo" src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNTAgMjUwIj4KICAgIDxwYXRoIGZpbGw9IiNERDAwMzEiIGQ9Ik0xMjUgMzBMMzEuOSA2My4ybDE0LjIgMTIzLjFMMTI1IDIzMGw3OC45LTQzLjcgMTQuMi0xMjMuMXoiIC8+CiAgICA8cGF0aCBmaWxsPSIjQzMwMDJGIiBkPSJNMTI1IDMwdjIyLjItLjFWMjMwbDc4LjktNDMuNyAxNC4yLTEyMy4xTDEyNSAzMHoiIC8+CiAgICA8cGF0aCAgZmlsbD0iI0ZGRkZGRiIgZD0iTTEyNSA1Mi4xTDY2LjggMTgyLjZoMjEuN2wxMS43LTI5LjJoNDkuNGwxMS43IDI5LjJIMTgzTDEyNSA1Mi4xem0xNyA4My4zaC0zNGwxNy00MC45IDE3IDQwLjl6IiAvPgogIDwvc3ZnPg==">
1213
</div>
1314
<h2>Here are some links to help you start: </h2>

0 commit comments

Comments
 (0)