Knockout region highlighting - visual studio 2013

醉酒当歌 提交于 2020-01-03 17:08:43

问题


Knockout highlighting is not working for me in VS2013. Given that I have the "knockout highlight color" setting:

...my assumption is that it should be working.

However, no dice:

Any ideas?


回答1:


I had the exact same issue. I am a total newbie to Visual Studio, and given that the Web Essentials listed knockoutJS intellisense out of the box I did not think one needed to do anything to 'turn it on'. Also, it seems support for Mustache templating and Angulars ng-bind syntax works out of the box so I was just as perplexed as you.

This is what I did:

I added an entry for a '_refereences.js' file as described in the answer for Intellisense doesn't work for JavaScript in Visual Studio 2012

I then created the file, and dragged the knockout.3.0.0.js file into the code area like descirbed on this blog

That gave me syntax highlight for Knockout data-binds, as well as Intellisense for Knockout.

Edit: Also check out this blogpost by Mads Christensen, the man behind Web Essentials. In the blog post he describes what _references.js is for, and how to use it.



来源:https://stackoverflow.com/questions/19874474/knockout-region-highlighting-visual-studio-2013

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!