B
B
Bowen2016-11-26 13:09:37
Angular
Bowen, 2016-11-26 13:09:37

How to resolve syntax conflict between angular2 and pug?

Local variables conflict with pug in angular2, example:

form((submit)="login(username.value, password.value)")
  label Username
  input(type="text" name="username" #username)
  label Password
  input(type="password" name="password" #password)
  button(type="submit") Submit

This code, when compiled, ends with an error: I found only one solution on the Internet. It is to add in each .pug file . Manually / automatically - it doesn't matter, it works, but it doesn't suit me, it's somehow not right IMHO. Has anyone else encountered this problem? did you solve it? if so, in what way? I would appreciate any help/advice.
35ae6803b06f4fcc8383610d4c49ff9c.png
doctype html

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
monochromer, 2017-02-08
@monochromer

https://pugjs.org/language/attributes.html#quoted-...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question