Hi,
You need HTTP_BINDINGS to accomplish your http. 
 

> *wwwroot->App->App.ts:*
>
>> import {bootstrap, Component, CORE_DIRECTIVES} from 'angular2/angular2';
>> import {Http,HTTP_BINDINGS, Response} from 'angular2/http';
>>
>> @Component({
>>     selector: 'my-app',
>>     templateUrl: './page.html',
>>     directives: [CORE_DIRECTIVES]
>> })
>>
>> export class AppComponent {
>>
>>     result: Object;
>>     http: Http;
>>     constructor(http: Http) {
>>         this.result = { friends: [] };
>>         http.get('friends.json')
>>             .map((res:Response) => res.json())
>>             .subscribe(res => this.result = res);
>>     }
>> }
>> bootstrap(AppComponent,[HTTP_BINDINGS]);
>>
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to