Getting an error with this script:
https://gist.github.com/whisher/6231714
The error I'm encountering is: Unknown provider: albumsProvider <- albums
this.app.config(($routeProvider:ng.RouteProvider) => {
$routeProvider.
when('/', {
templateUrl: './view.html',
resolve: {
albums: function(Album) {
console.log(Album);
return Album.getResource().query();
}
},
controller: 'AlbumController',
})
} );
class AlbumController {
constructor (private $scope,private albums) {
this.$scope.test = '20 whatsomething';
this.$scope.albums = albums;
}
}
I have checked that Album is in the scope using console.log(Album); However, I am only getting the above error instead of the desired albums.
I'm not sure which direction to take next. Any hints or suggestions would be appreciated!
Thank you.