Home » JavaScript (page 30)


Angular.js Data Binding Example

Hey! Today we ‘ll see how we can easily update our angular views, using ngModel. To begin with, according to angular applications, data-binding is the automatic synchronization of data between the model and view components (for those that didn’t get this at all, please take a look over the MVC pattern). Regarding Angular’s implementation, the view is a projection of ...

Read More »

Communication between Angular Controller and Directive

Since I had issues finding a good explanation on how to tie together a controller and a directive with isolated scope I decided to create my own blog post on this subject. This repo contains a runnable example of the solution. It contains a Spring Boot Web Application that can be started to act as a HTTP server but all the ...

Read More »

Javascript Array Length Example

Every programmer learning a new language has to study the way it manages arrays and their size. In native Javascript, length is a property of every array and obviously it is used to retrieve or set the length of that array. The length property is a part of the Array prototype and may be a non-negative integer less then 232. ...

Read More »

Javascript Array Push Example

There are times when you’ve been coding for too long and you don’t remember where exactly did you initialize your array type variable. If you’re too lazy or too strapped for time to search for it and add another element, then you have the means to do that right then and there, without any effort. The following shows you how. ...

Read More »

Pack It Up, Pack It In

Let me begin with a list of usual suspects up to no good in the browser: CoffeeScript (or TypeScript) Less (or Sass/Scss) Jade (or Handlebars, Mustache) I mean, because, you know, writing in HTML/JS/CSS is so 2000-late. All this 74 72 61 6e s p i l a t i o n. A typical layout. Something like this: You’re using ...

Read More »

The mystery of no flash session variables in Express + Passport auth

Someday I started an application using NodeJS with ExpressJS framework and decided to use passport for authenticate the users. As many other times I wanted to use flash messages so, when user authentication fails, the application shows a message informing about bad credentials. Nothing new on the horizon until…. OMG !!! I can’t see the flash messages !!! Disclaimer: This is ...

Read More »

Javascript History Back Example

Everyone who has ever used a computer knows what the Back Button is. We’ve seen it in browsers, apps, everywhere. It is claimed to be the second most used navigation feature again, and according to Mozilla, it is their most clicked Firefox button. If users (and you too) find this feature this useful, why in the world would you not ...

Read More »

Declarative Beats Imperative: Transforming Data In JavaScript

The product I am working on is a fairly typical web application, based on React.js and Node.js. Its main task is to fetch data from different REST-ish services, combine them, and present them in an attractive manner to users. This data extraction and transformation – keeping only the items and properties we care about and structuring them in a way ...

Read More »

Want to take your WEB dev skills to the next level?

Grab our programming books for FREE!

Here are some of the eBooks you will get:

  • PHP Programming Cookbook
  • jQuery Programming Cookbook
  • Bootstrap Programming Cookbook
  • Building WEB Apps with Node.js
  • CSS Programming Cookbook
  • HTML5 Programming Cookbook
  • AngularJS Programming Cookbook