javascript - Preventing Jade from adding an assignment clause in an HTML element -


i want define local variable in input tag angular 2 application:

input(#sometext) button((click)="addtechnology(sometext.value)") add 

the output expecting is:

<input #sometext/> <button (click)="addtechnology(sometext.value)">add</button> 

however real output (notice additional ="#sometext"):

<input #sometext="#sometext"/> <button (click)="addtechnology(sometext.value)">add</button> 

this way, angular 2 throws following error, due ="#sometext":

cannot find directive exportas = '#sometext'  error: cannot find directive exportas = '#sometext'     @ new baseexception (https://code.angularjs.org/2.0.0-alpha.28/angular2.dev.js:7248:25)     @ _finddirectiveindexbyexportas (https://code.angularjs.org/2.0.0-alpha.28/angular2.dev.js:12454:13)     @ https://code.angularjs.org/2.0.0-alpha.28/angular2.dev.js:12435:22     @ map.foreach (native)     @ function.execute.mapwrapper.foreach (https://code.angularjs.org/2.0.0-alpha.28/angular2.dev.js:7614:15)     @ createdirectivevariablebindings (https://code.angularjs.org/2.0.0-alpha.28/angular2.dev.js:12434:16)     @ _createprotoelementinjector (https://code.angularjs.org/2.0.0-alpha.28/angular2.dev.js:12414:39)     @ _createelementbinders (https://code.angularjs.org/2.0.0-alpha.28/angular2.dev.js:12391:34)     @ _createappprotoview (https://code.angularjs.org/2.0.0-alpha.28/angular2.dev.js:12331:5)     @ https://code.angularjs.org/2.0.0-alpha.28/angular2.dev.js:12641:32 

do know way of preventing jade completing attribute additional ="#sometext"?

in end simple using doctype html @ beginning of jade template. had in main layout seems included files need it.


Comments

Popular posts from this blog

python - pip install -U PySide error -

arrays - C++ error: a brace-enclosed initializer is not allowed here before ‘{’ token -

cytoscape.js - How to add nodes to Dagre layout with Cytoscape -