danguilherme / ng-cli-pug-loader

:sparkles: Angular schematics to add .pug to your project
GNU General Public License v3.0
56 stars 17 forks source link

Angular (7) component accepts only html files but does not support htm file #29

Closed majedur-rahaman closed 11 months ago

majedur-rahaman commented 4 years ago

Component is defined like this:

import {Component} from '@angular/core'; @Component({ selector: 'app-root', templateUrl: './app.component.html', styleUrls: ['./app.component.less'] }) export class AppComponent {

} I would like to load in some specific components instead of "app.component.html" a file with extention htm "app.component.htm"

@Component({ selector: 'app-root', templateUrl: './app.component.htm', styleUrls: ['./app.component.less'] }) from some reason it doesnt work it says:

ERROR in ./app.component.htm 1:0 Module parse failed: Unexpected token (1:0) You may need an appropriate loader to handle this file type.

app component works!

「wdm」: Failed to compile. Please help me find a way to load an htm file? I am aware that there is a way to bootstrap with Webpack, I would like to keep the current build of ng-serve\cli angular.json!

Thank you!

danguilherme commented 11 months ago

This project is no longer maintained.