angular - import HTTP_PROVIDERS in app.component.ts -


when try import http_providers angular/http have error:

error:(3, 9) ts2305: module '"projectname/node_modules/@angular/http/index"' has no exported member 'http_providers'. 

this file content:

import { component } '@angular/core'; import {githubservice} './services/github.service'; import {http_providers}  '@angular/http';  @component({     selector: 'my-app',     template: '<h1>my first angular 2 app</h1><profile></profile>',     providers: [ http_providers, githubservice ] })  export class appcomponent { } 

if use >= rc.5 add httpmodule imports in @ngmodule instead:

@ngmodule({   imports: [httpmodule],   ... }) class appmodule {} 

Comments

Popular posts from this blog

java - Jasper subreport showing only one entry from the JSON data source when embedded in the Title band -

serialization - Convert Any type in scala to Array[Byte] and back -

SonarQube Plugin for Jenkins does not find SonarQube Scanner executable -