E
E
Egor Zheludkov2016-11-07 10:40:37
JavaScript
Egor Zheludkov, 2016-11-07 10:40:37

How to connect Http in Angular 2 RC5?

Colleagues! Help to connect HttpModule in Angular 2 Release Candidate 5.
I've been struggling with the task for a day, the same error always crashes.
SystemJS: Expected expression, got '<'
Until Http was connected, Angular 2 worked correctly. I even redownloaded the packages. I read that it could be an incorrect connection of libraries, but VisualStudio Code, which monitors such things, did not give any errors. What's the problem? We really need help, comrades!

File app.component.ts import
import {Component, Injectable} from '@angular/core';
import { TodoListComponent } from './todo/todo-list.component';
import { todo } from './todo/todo';
import { TodoItem } from './todo/todo-item.component'
import { TodoFormComponent } from './todo/todo-form.component'
import { Http, HttpModule, Response } from '@angular/http';

@Component({
selector: 'todo-app',
templateUrl: `./app/app.component.html`,
styleUrls: ['./app/app.component.css'],
directives: [TodoListComponent,TodoFormComponent, TodoItem ]
})

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Egor Zheludkov, 2016-11-18
@jsmaster

'@angular/http' : {main: 'bundles/http.umd.min.js'}

Prompted by Ruslan Lopatin @lorus . Why it works like that, I don't understand. But it works!

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question