Skip to content

Commit 339af33

Browse files
Broccofilipesilva
authored andcommitted
fix(generate): use canonical paths for template and style URLs
Close angular#1840
1 parent 5b2731c commit 339af33

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

addon/ng2/blueprints/component/files/__path__/__name__.component.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ import { Component, OnInit } from '@angular/core';
77
<%= dasherizedModuleName %> Works!
88
</p>
99
`,<% } else { %>
10-
templateUrl: '<%= dasherizedModuleName %>.component.html',<% } if(inlineStyle) { %>
10+
templateUrl: './<%= dasherizedModuleName %>.component.html',<% } if(inlineStyle) { %>
1111
styles: []<% } else { %>
12-
styleUrls: ['<%= dasherizedModuleName %>.component.<%= styleExt %>']<% } %>
12+
styleUrls: ['./<%= dasherizedModuleName %>.component.<%= styleExt %>']<% } %>
1313
})
1414
export class <%= classifiedModuleName %>Component implements OnInit {
1515

addon/ng2/blueprints/ng2/files/__path__/app/app.component.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ import { APP_SHELL_DIRECTIVES } from '@angular/app-shell';<% } %>
99
</h1>
1010
`,
1111
styles: [],
12-
directives: [APP_SHELL_DIRECTIVES]<% } else { %>templateUrl: 'app.component.html',
13-
styleUrls: ['app.component.<%= styleExt %>']<% } %>
12+
directives: [APP_SHELL_DIRECTIVES]<% } else { %>templateUrl: './app.component.html',
13+
styleUrls: ['./app.component.<%= styleExt %>']<% } %>
1414
})
1515
export class AppComponent {
1616
title = 'app works!';

0 commit comments

Comments
 (0)