JavaScript is undoubtedly one of the most popular programming languages in the world. It’s used almost everywhere: from large-scale web applications to complex servers to mobile and IoT devices. Part #1: Introduction ECMAScript is a general-purpose programming language, standardised by Ecma International according to the document ECMA-262. It is a JavaScript standard meant to ensure... Continue Reading →
Angularjs Factory Unit Test Case
Factory Code (function() { 'use strict'; angular .module('myApp.restangular') .factory('Users', Users); Users.$inject = [ 'Restangular', 'apiUrl' ]; function Users(Restangular, apiUrl) { var Users = Restangular.service('users'); Restangular.extendModel('users', function(model) { model.isRecent = function() { var createdAt = moment.utc(this.created_at); var difference = moment.duration(moment.utc().diff(createdAt)); return difference.asHours() < 48; } model.lastConnection = function() { return moment.utc(this.updated_at).fromNow(); }; model.isOnline = function() {... Continue Reading →
What is the difference between compile and link function in angularjs ?
What is the difference between compile and link function in angularjs ? In compile phase, the angular parser starts parsing the DOM and whenever the parser encounters a directive it creates a function. These functions are termed as a template or compiled functions. In this phase, we do not have access to the $scope data.... Continue Reading →
Push Notifications for Web Browsers
How do you increase the site’s traffic? E-commerce businesses’ main goal is to keep engage their existed subscribers and get the new visitors. There are many ways to grow site’s traffic and customer engagement - by sending email notifications, SMS alerts, through social media and do web push notifications. Today, we are going to see... Continue Reading →