madskristensen / WebEssentials2013

Visual Studio extension
http://vswebessentials.com
Other
944 stars 251 forks source link

Minify Angular.js binding expressions causes exception with ngRepeat #1818

Open kb3eua opened 9 years ago

kb3eua commented 9 years ago

If I have the setting "Minify Angular.js binding expressions" set to true, and I have the following markup to iterate over a 2-dimensional array or object: <div ng-repeat="item in itemArray[myIndex] track by item.id"></div> ... then that minifies to: <div ng-repeat="item in itemArray[myIndex]track by item.id"></div>

So the space between the closing square bracket "]" and the "track by" expression is removed, which causes Angular to give me the error: "Token 'track' is an unexpected token".

Taritsyn commented 9 years ago

I will try to fix this bug in the next release of WebMarkupMin.