Javascript
If you need modals in an AngularJS application, look no further. I’ll show you how to use the Angular Modal Service to add Bootstrap Modals or your own custom modals to your application.
See it in a fiddle or check out a full set of samples online.
Contents [Using the Angular Modal Service](#UsingTheAngular ModalService) A Quick Example Design Goals How It Works Wrapping Up Using the Angular Modal Service Here’s how you can use the Angular Modal Service to add a bootstrap modal to your application.
Read more
Promises are a core feature of AngularJS - whether you understand them or not, if you use AngularJS you’ve almost certainly been using them for a while.
In this post I’m going to explain what promises are, how they work, where they’re used and finally how to use them effectively.
Once we’ve got the core understanding of promises, we’ll look at some more advanced functionality - chaining and resolving promises when routing.
Read more
I’m going to be working in F# almost exclusively for a short while, so before I throw myself into that I wanted to wind up my Practical AngularJS Part 2 article. It’s ready to rock here:
Practical AngularJS Part 2 - Components of an AngularJS Application
In this article we get a brief introduction to what’s in the toolkit for an angular developers - filters, controllers, services, directives, views and routes.
Read more
Langton’s Ant is a great simulation to write to play with a language. Just today I’ve completed my Langton’s Ant write up and published it on the CodeProject, you can see the article at Learn JavaScript Part 3 - Angularjs and Langton’s Ant.
There are some interesting things in the article for angular too - a look at using directives for custom elements, how to handle both the DOM and Angular loading correctly, and timers and intervals.
Read more
A superb article by Colin Eberhardt has just been published on the CodeProject, called ‘Understanding JavaScript Object Creation Patterns’.
This article should be on the reading list of anyone who’s new to JavaScript or not familiar with how objects and prototypes work. It takes you step by step through the basics all the way to protoypes and classes.
The article is at:
http://www.codeproject.com/Articles/687093/Understanding-JavaScript-Object-Creation-Patterns
I’d strongly recommend it!
I was recently at Devoxx in Antwerp, primarily because I wanted to get involved in some of the sessions that were being hosted by guys from the AngularJS team at Google. I’ve had a chance to work a little with Backbone and KnockoutJS and had been recently deliberately holding off looking at AngularJS so I could hit the conference and workshops fresh and unencumbered with any preconceptions.
The sessions were great, and since then I’ve been working on a couple of projects that use Angular.
Read more
I’m currently writing a series of articles on the CodeProject called ‘Learn JavaScript’ and am pleased to say that the latest article is available now!
Learn JavaScript Part 2 - Space Invaders
In this article we take a look at how to create the classic space invaders game with plain JavaScript and HTML - no libraries or frameworks. You can see it in action on the page experiments/spaceinvaders. Check it out - as always, comments are welcome!
Read more
If you take a look at theExperiments Page you’ll see that there’s a new entry - Space Invaders.
Space Invaders is a great little game to code if you’re learning a new language or technology (and JavaScript is still very much in that category for me). I’ll be writing up how I made the game on the CodeProject soon enough (if you’re interested you can see how I made the starfield background in JavaScript).
Read more
I’m staring a series of articles on learning Javascript (the first is available at http://www.codeproject.com/Articles/642499/Learn-JavaScript-Part-1-Create-a-Starfield). To help with this, I’ve created the Experiments page. This page will host each of the things I’ve been playing with in the process of learning JavaScript and coming up with good topics for tutorials.
You can see the Experiments page here, there’s also a link at the top of the site. If you like it, please feel free to comment on this post or get in touch.
Read more
In a Nutshell Sending a response in Express with a call like res.send(status, body) will send body as the status code if it is numeric - ignoring status. This is due to a fudge for backwards compatibility. The Details As part of a project I'm working on, I'm writing a service using node.jsand Express. This service exposes some entities in a MongoDB database through a REST API. Typically I hit this API through client-side Javascript, but in some places I want to hit the same API from some C# code - and I don't want to have to create classes for everything.
Read more