I get the following error "Module 'ui-router' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument."
What is weird is that I have installed ui-router using npm install and it is in my packages.json file.
I presume the error is because I have misspelled the module name?
Any help is really appreciated,
As the error states you either misspelled the module name or forgot to load it. In this case you misspelled it, it should be
var app = angular.module('myApp', ['ui.router']);
The only other cause of this error, after spelling it correctly, would be that you forgot to load it. Fix this by including a reference to the library.