Skip to content

Html complention not working with templates imported with TypeScript using SystemJs loader #125

@tolemac

Description

@tolemac

I use systemjs-plugin-text to load html templates, I found this solution as easiest way to bundle .html and .js files using systemjs-builder.

I import the templates using typescript this way:

import * as template from "./my.component.html";
@Component({
    selector: "my",
    template: template
})
export class MyComponent implements OnInit { ... }

I get the following error on Component decorator: [Angular] Component EmCrudListComponent must have a template or templateUrl

And html complention isn't working.

Do you know some way to do work it?

I have tried to use systemjs-angular-loader from angular/quickstart but it broke my bundling system due to systemjs-builder not detect the html imports.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions