JSFiddle - React, Tailwind, and code Playground
by Jeroen Heijmans
HTML
<a class="icon-set" data-bind="attr: { href: Contact.fullEditUrl() }" >📝</a>
JavaScript
window.contact = {};
window.contact.Contact = function (data) {
var contact = this;
this.id = ko.observable(data.id);
this.fullEditUrl = ko.computed(function() {
return "http://localhost:24191/contact/contactfulledit/" + data.id;
});
}
var vm = { Contact: new window.contact.Contact({id:42}) };
ko.applyBindings(vm);