This script
https://gist.github.com/whisher/6231714
give me this error
Error: 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;
}
}
the Album is in the scope console.log(Album); so
I'm waiting to get albums
in my controller but I get
only the above error :(
I don't really know which way to turn
can you give me an hint ?
Thanks