From 339af334da78dce16ae502c91ff4265b189f229a Mon Sep 17 00:00:00 2001 From: Mike Brocchi Date: Thu, 25 Aug 2016 14:11:33 -0400 Subject: [PATCH] fix(generate): use canonical paths for template and style URLs Close #1840 --- .../blueprints/component/files/__path__/__name__.component.ts | 4 ++-- addon/ng2/blueprints/ng2/files/__path__/app/app.component.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/addon/ng2/blueprints/component/files/__path__/__name__.component.ts b/addon/ng2/blueprints/component/files/__path__/__name__.component.ts index afe021f7b9bb..a56178e90a33 100644 --- a/addon/ng2/blueprints/component/files/__path__/__name__.component.ts +++ b/addon/ng2/blueprints/component/files/__path__/__name__.component.ts @@ -7,9 +7,9 @@ import { Component, OnInit } from '@angular/core'; <%= dasherizedModuleName %> Works!

`,<% } else { %> - templateUrl: '<%= dasherizedModuleName %>.component.html',<% } if(inlineStyle) { %> + templateUrl: './<%= dasherizedModuleName %>.component.html',<% } if(inlineStyle) { %> styles: []<% } else { %> - styleUrls: ['<%= dasherizedModuleName %>.component.<%= styleExt %>']<% } %> + styleUrls: ['./<%= dasherizedModuleName %>.component.<%= styleExt %>']<% } %> }) export class <%= classifiedModuleName %>Component implements OnInit { diff --git a/addon/ng2/blueprints/ng2/files/__path__/app/app.component.ts b/addon/ng2/blueprints/ng2/files/__path__/app/app.component.ts index e29b19409839..0d430aed8ce3 100644 --- a/addon/ng2/blueprints/ng2/files/__path__/app/app.component.ts +++ b/addon/ng2/blueprints/ng2/files/__path__/app/app.component.ts @@ -9,8 +9,8 @@ import { APP_SHELL_DIRECTIVES } from '@angular/app-shell';<% } %> `, styles: [], - directives: [APP_SHELL_DIRECTIVES]<% } else { %>templateUrl: 'app.component.html', - styleUrls: ['app.component.<%= styleExt %>']<% } %> + directives: [APP_SHELL_DIRECTIVES]<% } else { %>templateUrl: './app.component.html', + styleUrls: ['./app.component.<%= styleExt %>']<% } %> }) export class AppComponent { title = 'app works!';