This article is really nice for you that are working with NodeJS and ExpressJS. You should read to improve your application … More
Category: javascript
[NodeJS] – How to automating front-end tasks with Grunt ?
What is Grunt ? The Grunt is a task automation Node.js module . Official WebSite :http://gruntjs.com/ How to install in your … More
[Node.js] – How to debug a node application ?
By node-inspector module : # install $ npm install -g node-inspector # run : $ node-debug app.js Debugger – Official Documentation … More
How to change the style of a log in the browser console ?
For you change the style of a log in the browser console you can use : console.log(‘%c <string>’, ‘<style>’); It … More
Javascript: How to wait N seconds to do something ?
You can use : setTimeout Full Example: function run() { setTimeout(afterSeconds, 10000); } function afterSeconds() { //{…DO SOMWTHING} }
JavaScript + Meteor JS : How to open a link in new window ?
Use : var win = window.open(url, ‘_blank’); win.focus(); Example in a Meteor Js application: clip.file <template name=”Clip”> <div class=”card-container”> {…} … More
JavaScript : Iterating arrays with forEach
array.forEach(function(entry) { alert(entry); } Example : if ( event.attractions ){ var att = []; event.attractions.forEach(function(entry) { if (entry.artist){ att.push(entry.artist); } … More
JavaScript : How to remove some item from an array ?
One way to remove some item is take his position on array and remove by this. Example: var users = … More
How to download a excel file from html using javascript ?
Table : <table id=”mytable”> {…} </table> Button : <a download=”file.xls” href=”#” class=”btn-print” data-name=”#{mytable}”> Download Excel File </a> JavaScript : <script> $(‘.btn-print’).on(‘click’, function() … More