Home » JavaScript (page 5)

JavaScript

AngularJS Tutorial: AngularJS Controller As Syntax

In the previous installment of this series we discussed scopes and what problems nested scopes can cause. There are a couple of solutions to this problem: the so-called Controller As syntax introduced by AngularJS 1.2 and .component()  method introduced by AngularJS 1.5. The latter option is a recommended way to go if you are thinking about upgrading your application to newer ...

Read More »

AngularJS Tutorial: Introduction to AngularJS Scopes

In the previous tutorial of this series we learned how to test controllers using Jasmine and Karma. In this post we discussed how data is passed from controller to view using $scope, which is the glue that links model and view. In this tutorial we’ll talk more about scopes, what are some possible pitfalls in using them, and later we’ll talk ...

Read More »

A Test-Driven Development Introduction to Angular 2 – Part 2

Updated for Angular 2 Release – I originally wrote this article/application when Angular 2 was still in beta. Now that it has released officially, I have updated the source code to reflect updates made to the Angular 2 framework for release. My approach to get this working was to start from the new Angular 2 quick-start project, port in the original ...

Read More »

Translate Javascript to C#

Let’s say you need to automatically port some code from one language to another, how are going to do it? Is it even possible? Maybe you have already seen a conversion between similar languages, such as Java to C#. That sounds much simpler in comparison. In this article we are going to discuss some strategies to translate Javascript to a very different ...

Read More »

AngularJS Tutorial: Unit Testing Angular Applications Using Jasmine and Karma

In the previous installment of this series we’ve learned how to perform End-to-End application testing using Jasmine and Protractor. In this part, we’ll discuss how to test controllers and how to automate this process. In fact, running tests manually may make the whole process tedious and may prompt one not to use tests altogether, so we’ll learn how to make test ...

Read More »

Building a Node Module That Connects to DB2

The NPM registry contains many Node modules that help you to connect to a wide variety of databases including MySQL, Oracle, Mongo and even IBM DB2. This article demonstrates how to write a very simple Node module that connects to DB2 using the ibm_db Node module provided by IBM. Key concepts covered in this article: Creating a simple Node module Using ...

Read More »

AngularJs 2 Series: Concept of Services

Introduction In this article I will demonstrate the concept of Services in AngularJs 2. I will show you how to develop a custom alert service that displays a message as an alert notification. We will use Angular CLI (Command Line Interface) to build the AngularJs 2 Service. The article assumes that you have already setup AngularJs with CLI. For more ...

Read More »

Up and Running with Vue.js

You don’t need another JavaScript framework. You’ve got one you’re using. Hopefully you’re happy with it. You just read eight other articles about other awesome, shiny, new, amazing, fabulous frameworks with astounding new features that will change your very existence into something incredible. Right? I did. Vue.js is (like many other frameworks) worthy of all of those adjectives. But none ...

Read More »

AngularJS Tutorial: Developing AngularJS Applications using VS Code

How to develop AngularJS applications on your local computer In the previous installment of this series, we talked about how to create a “Hello, World” AngularJS application using Plunker, which is itself written using Angular. While using Plunker may be good for quick prototyping and showing your achievements to others, you’ll be more productive by developing your code on your ...

Read More »