return{ // this code is in index.js
addItem: function () {
alert("working");
Newram.show().then(function (response) `***// Calling show functionin Newram.js***`
{
var c = response;
}
);
}}
// In Newram.js while closing the popup i tried to send data to the **response** in index.js but empty string or undefined is showing
var AddItem = function () {
var self = this;
self.Name = ko.observable('jo'),
self.Price = ko.observable(100),
self.Sales = ko.observable("good")
self.data1= {name:self.Name() };
};
AddItem.prototype.closeDialog = function () {
dialog.close(this, self.Name);
};
I cant able to pass an observable data while closing a popup even i tried this code( dialog.close(this,ko.toJS(self.Name))).....cant able to get the data in response but if i pass a string it is available in the response