In knockout.js I have a very standard field that looks like this:
<label data-bind="text: JobTitle"></label>
What I’d like is to have a default value specified in here if the text value is null, for example “No Job Title Specified”.
Is this possible to do in knockout.js?
Thanks.
So I’m guessing you want a real default value and not just a placeholder text. Here’s a way to do that with an extender;
http://jsfiddle.net/madcapnmckay/aTMpp/
Hope this helps.