or
var foodMS = kendo.observable({ description: "Description", isDescriptionShown: false, showDescription: function (e) { // show the span by setting isDescriptionShown to true this.set("isDescriptionShown", true); }, showMessage: function (e) { alert(this.get("isDescriptionShown")); } });<div data-role="view" data-title="Add Nice Food" data-layout="main" id="foodMS_add" data-model="foodMS" data-after-show="showMessage"> <span id="showsomething" data-bind="events: { click: showMessage }"> <button data-role="button">Show</button> </span></div>$scope.generateInvoice = function (id) { $modal.open({ controller: 'generateInvoiceController', templateUrl: '/app/views/invoices/_generate-invoice.html', resolve: { invoiceId: function() { return id; // I want to pass the invoiceId in } } }); };