Reputation: 225
Working a new project using Knockout, the base documentation didn't seem to explain a case as below. Using the below attr calling; An incorrect href is produced: "api/degrees/function c(){if(0"
<a data-bind="attr: { href: '/api/degrees/' + fieldId }">
Although the following produces the fieldId value correctly
<a data-bind="attr: { href: fieldId }">
Is the only way to successfully combine the base url string and JS object value to use a Knockout computed value?
Thanks in advance for the help.
Upvotes: 14
Views: 5036