Skip to content

Allow templateUrl and styleUrls to exclude path #3838

Closed
@johnpapa

Description

@johnpapa

As per our discussion with @wardbell @Brocco and @filipesilva , we'd like to make the CLI be comfortable when a module.id exists in the @Component( ... ) decorator such that the url properties can simply be the name of the file. Examples that should work:

// no module.id
@Component(
  templateUrl: './foo.html'
) export class FooComponent { ... }
@Component(
  // module.id and just a file name, defaults to ./
  moduleId: module.id,
  templateUrl: 'foo.html'
) export class FooComponent { ... }
@Component(
  // module.id and uses the existing specified path /.
  moduleId: module.id,
  templateUrl: './foo.html'
) export class FooComponent { ... }

Metadata

Metadata

Assignees

Labels

P1Impacts a large percentage of users; if a workaround exists it is partial or overly painfultype: bug/fix

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions