Closed NickScola closed 8 years ago
Hi,
I just updated the package to fix that problem, update it and you will need also to change the import line to:
import SpotifyService from 'angular2-spotify/angular2-spotify';
and also change the SystemJS config to:
System.config({
map: {
'angular2-spotify': 'node_modules/angular2-spotify',
'angular2': 'node_modules/angular2',
'rxjs': 'node_modules/rxjs',
},
packages: {
'angular2-spotify': { fomat: 'register', defaultExtension: 'js' },
'angular2': { fomat: 'register', defaultExtension: 'js' },
'rxjs': { fomat: 'register', defaultExtension: 'js' },
app: { format: 'register', defaultExtension: 'js' }
}
});
System.import('app/main')
.then(null, console.error.bind(console));
and your main.ts to:
import { bootstrap } from 'angular2/platform/browser';
import { AppComponent } from './app.component';
import {HTTP_PROVIDERS} from 'angular2/http';
bootstrap(AppComponent, [
HTTP_PROVIDERS
]);
Don't forget to add callback.html to your project and whitelist it in the Redirect URIs of your Spotify App.
I'll add these steps to the documentation later.
Perfect thank you!
I keep getting this error:
Error loading http://localhost:3000/angular2-spotify as "angular2-spotify" from http://localhost:3000/app/app.component.js
Attached is my the project. ang.zip