Home » JavaScript » Page 51

JavaScript

Angular.js Controller Example

Hello! In today’s example we ‘ll see how do Angular’s controllers work. To get into this, I chose a simple form concept, where the user is prompt to insert his username. This updates an informative message (i.e. “Your username is “); I’ll also include a reset button, for demonstration purposes.               1. Required Background ...

Read More »

Javascript document.write() example

In this article we’ll consider some examples of using document.write() method. This method is commonly used for testing and dynamically generating page content while it’s loading. It’s a fast way to modify the document and may be used as an alternative to other approaches which are more suitable when the DOM is completely ready.           Take ...

Read More »

Javascript Number Format Example

We’ve all had to customize the formatting of a specific number, or a ton of them. Most of the time, if you have to format many numbers, it’s boring and annoying to format each one of them, so that’s why we use some specific ways in Javascript. Adding commas One of the most typical formatting you do to numbers is ...

Read More »

Angular.js Routing Example

Hey geeks! Today’s example is related with routing in AngularJS. What I firstly found out, while searching over the net for similar resources, is that there isn’t yet any simple example, suitable for an Angular newbie. So, I’ll try to keep today’s post as simple as I can.                 1. What is routing ...

Read More »

JavaScript – A Tough Love

In the 90’s we were witnesses of browser wars. Wars which created one of the most hated languages: Javascript. Web designers touch by Javascript at the beginning of 21st century constantly refused to fix bugs titled as “It doesn’t work in Internet Explorer” or “Netscape Navigator doesn’t show…”. At this time we used pure languages and tried to understand the ...

Read More »

Backbone.js Events Example

The purpose of this tutorial is to provide basic understanding of backbone.js along with its components. We will be discussing that what backbone.js actually is and how it differs from other JavaScript libraries. In particular, we will be understanding its out of the box support for events with example. We will start from the very first step which is to set ...

Read More »

AngularJS Integration Tests with Mocks and Magic

As a web developer I’m not a huge fan of full end-to-end tests. My opinion is changing with maturing frameworks like protractor but I still think looking for a “button” with an “id” is a fragile test that may have to change often. I am far more interested in what happens when the button is clicked than the button itself, ...

Read More »

jQuery Data Grid Control Example

In this example we will learn how to integrate a data grid plugin into a web application to display and manage many records of data instead of using the simple table element without manipulation. Most of these plugins provide a very flexible API to easily add/edit/remove records, paginate, sort and filter data based on predefined criteria. I have chosen for ...

Read More »

Creating an Angular.js application without JavaScript: Scala.js

In my day job I work a lot with Angular.js. And while this is a great framework, sometimes I do miss the type-safety and advanced features of languages such as Scala. Getting “undefined is not a function” is not the the most informative error message you get when developing JavaScript applications. A couple of weeks ago I ran across a ...

Read More »