Error 404 : (I see, you have to add "http" in your "index.html" , and you
have to adjust the "friends.json" path :
* 1/add "http" to your index.html : *
<script src='......./angular2.dev.js'></script>
<script src='......./ http.dev.js'></script>
>
> *2/ wwwroot->App->App.ts:*
>
>>
>> .......
>> export class AppComponent {
>>
>> result: Object;
>> http: Http;
>> constructor(http: Http) {
>> this.result = { friends: [] };
>> http.get('App/friends.json')
>> .map((res:Response) => res.json())
>> .subscribe(res => this.result = res);
>> }
>> }
>> bootstrap(AppComponent);
>>
>
> *wwwroot->App->friends.json:*
> {
> "friends": [ "Joe", "Tim", "Jim", "Jane" ]
> }
>
>
>
>
--
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.