This is the most easiest java script pattern I found . Its works so nicely with many frameworks (jQuery, ExtJS) .
Usage
$(document).ready(function(){
var mySamplePlugin = new SamplePlugin({ id : a }); //Input your parameters
mySamplePlugin.testFunction();
});
Model
var SamplePlugin = function (config) {
var p = this;
p.id = config.id;
p.testFunction = function () {
alert(p.id);
};
};
Happy Coding Fellows!
Windows 7, Linux, Mac, JavaScript, jQuery, ExtJs, Angular, .NET, Java, Android, iOS, php, mysql, lucene and more...
Subscribe to:
Post Comments (Atom)
-
I'm using following code part to access a ReST API. I'm communicating with this API using a X509 client certificate. In d...
-
Recently I purchased nord-vpn for testing. But I could not use their service due to a technical reason. So I wanted to cancel and get my mo...
-
I noticed that all events of root/home page isn't working after I have navigated back in my ionic 4 app. So if you using a back butto...
No comments:
Post a Comment