/*models.ts*/
import {Injectable,bind,Inject} from 'angular2/core';
export var testServiceInjectables: Array<any> = [
bind(TEST_API_URL).toValue(TEST_API_URL)
];
/*boot.ts*/
import {testServiceInjectables} from './services/models';
bootstrap(loginForm, [HTTP_PROVIDERS, youTubeServiceInjectables]);
/*app.ts*/
import {Injectable, bind, Component, Inject} from 'angular2/core';
export class test{
constructor(public http: Http,
@Inject(TEST_API_KEY) private apiKey: string
){
}
}
But getting all the time Cannot find name 'YOUTUBE_API_KEY'".
I doing like tutorial in ng-book2 but i do not know what I am missing.