April 21, 2016 1 Comment

Example of if a variable is undefined function test() { console.log(_.isUndefined(foo)); // true, no error due to hoisting var foo = 3; console.log(_.isUndefined(foo)); // false, foo is defined now. } Example of if

July 23, 2015 0 Comments

Install Node from the EPEL Repository An alternative installation method uses the EPEL (Extra Packages for Enterprise Linux) repository that is available for CentOS and related distributions. To gain access to the EPEL

March 27, 2015 0 Comments

How to run nodejs from background. Here is an easy way $ nohup node app.js & Howevery, the forever will do more things, such like export log files, js api... $ sudo npm

January 16, 2015 0 Comments

var cartTemplate = ' Name: {{na}} Sku: {{sk}}'; var compiled = Handlebars.compile(cartTemplate); console.log(compiled({na: ‘Compact Round Trampoline’, sk : ‘R54’})); console.log(compiled({na: ‘Medium Round Trampoline, sk : ‘R79’})); From above sample code, we can define

January 9, 2015 1 Comment

Here is a good example of backbone validate Backbone.js Test by Ning Backbone.js Test by Ning

January 9, 2015 0 Comments

console.log(yourObject instanceof Backbone.Model); or console.log(yourObject instanceof yourModel); The instanceof operator tests whether an object has in its prototype chain the prototype property of a constructor.

November 13, 2013 0 Comments

Basic Version In our basic version, we will have a single div containing a loading spinner and once our large image is loaded (in the background) we will remove the spinner and insert

October 9, 2013 0 Comments

Step-1 : Generate Token System For All Web-Service: Generating Token : Step-2 : Use it while sending ajax call: var form_data = { data: $("#data").val(), //your data being sent with ajax token:'', //used

August 26, 2013 0 Comments

Here is good tutorial for js form validation with JQuery http://jqueryvalidation.org/documentation/

August 22, 2013 0 Comments

HTML .... Javascript var url = ajaxUrl; $.post(url, { method: "getAllProducts" }, function(data) { var obj = jQuery.parseJSON(data); var directive = { "li.prod-tramp": { "t