How do I use `pug` template in angular 6 project
See original GitHub issueI’m submitting a…
I changed app.component.html
as app.component.pug
and modified that content, on terminal it showed
ERROR in ./src/app/app.component.pug 4:14
Module parse failed: Unexpected token (4:14)
You may need an appropriate loader to handle this file type.
| div(style='text-align:center')
| h1
> | Welcome to {{ title }}!
| img(width='300', alt='Angular Logo', src='data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNTAgMjUwIj4KICAgIDxwYXRoIGZpbGw9IiNERDAwMzEiIGQ9Ik0xMjUgMzBMMzEuOSA2My4ybDE0LjIgMTIzLjFMMTI1IDIzMGw3OC45LTQzLjcgMTQuMi0xMjMuMXoiIC8+CiAgICA8cGF0aCBmaWxsPSIjQzMwMDJGIiBkPSJNMTI1IDMwdjIyLjItLjFWMjMwbDc4LjktNDMuNyAxNC4yLTEyMy4xTDEyNSAzMHoiIC8+CiAgICA8cGF0aCAgZmlsbD0iI0ZGRkZGRiIgZD0iTTEyNSA1Mi4xTDY2LjggMTgyLjZoMjEuN2wxMS43LTI5LjJoNDkuNGwxMS43IDI5LjJIMTgzTDEyNSA1Mi4xem0xNyA4My4zaC0zNGwxNy00MC45IDE3IDQwLjl6IiAvPgogIDwvc3ZnPg==')
| h2 Here are some links to help you start:
ℹ 「wdm」: Failed to compile.
Current behavior
Module parse failed: Unexpected token 「wdm」: Failed to compile.
Expected behavior
「wdm」: Compiled successfully.
Environment
Angular version: 6.1.0
For Tooling issues:
- Node version: 8.11.1
- Platform: Mac
Issue Analytics
- State:
- Created 5 years ago
- Reactions:2
- Comments:11 (3 by maintainers)
Top Results From Across the Web
Using PUG (or Jade) templates with the Angular-CLI - Medium
Using PUG (or Jade) templates with the Angular-CLI ... Note: For Angular 6+ you can simply run ng add ng-cli-pug-loader to automatically run...
Read more >Using Pug (Jade) with Angular (with CLI) - HackerNoon
First one, the simplest one, don't use pug, use HTML. · Run ng eject to eject the angular-cli. · Use other angular boilerplate...
Read more >Pug support for Angular 2 / Angular 4 / Angular 6 / Angular cli ...
I saw many solutions, some of them: in each component was added something like "require!pug-loader()some.component.pug". Get away from using ...
Read more >Pug-up your Angular markup - Thorsten Hans
When building SPAs using Angular or AngularJS, you use custom HTML markup extensions (aka directives) to instrument Angular how to render ...
Read more >vscode-angular-pug - Visual Studio Marketplace
This plugin adds syntax highlighting for angular Pug template files in VS Code. It supports the angular syntax itself and HTML DOM events....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@benlesh anyway, thank you for the suggestion, I suppose it is time to migrate
angular
tovue
.@ericmartinezr I don’t understand why you all support
sass
,stylus
,less
those style templates, but you didn’t supportpug
in@angular-devkit
.