Knockout Intellisense for databinding to a specific ViewModel using Design Time Comment like in XAML
It would be helpful if they allowed you to add a html comment specialized in letting the designer know that a specific region is using a specific JavaScript file that represents the view model. That way when the designer can’t figure it out, we can override it to be very specific. This would be very similar to the design time XAML syntax you can use to tell it the data bind type.
comments will be supported when Web Tools 2012.2 reaches RTM
3 comments
-
Brandon Wittwer commented
Great news that this will be implemented! My views are stored as individual HTML files and share a folder naming convention which could be used to correlate them to their companion viewmodels. They're implemented with https://github.com/ifandelse/Knockout.js-External-Template-Engine/
Either way it seems like a comment tag which can point to a namespace to find the viewModel that a view should be associated to would be perfect. Something like
<!- - ///<knockoutVM location="myapp.viewModels.ThisViewsModel" /> - ->
I'm sure there would be a better way to write the tag than my mishmash of html+js comments but you get the gist.
Thanks for all your work on Web Essentials and WebTools. I get so excited when I see that one of them is updated! Keep it up!
-
Corey Gaudin
commented
Thanks Mads. You are awesome! Keep up the amazing work you guys are putting out. Its mind blowing how great things are in the ASP.NET world and how fast we are moving forward.
-
Amit
commented
It will be really great to see that. Thanks.