How to resolve the syntactic conflict between angular2 and pug?

With pug in conflict with local variables in angular2, for 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 compiling ends with error:
35ae6803b06f4fcc8383610d4c49ff9c.png
In the Internet found only one solution. It is to add in each file.pug doctype html. Manually/automatically - it doesn't matter, it works, but I do not like it, it's like something is not right IMHO.

Did someone else have this problem ? have you decided it ? if Yes then how ?
I would appreciate the help/advice.
July 2nd 19 at 14:03
1 answer
July 2nd 19 at 14:05
The decision which it describes, helps when using bindingof on the example (click).
As for local variables, you still have to use doctype html. - isom_Stark commented on July 2nd 19 at 14:08

Find more questions by tags PugAngular