I am new in both angular2 and .net core I followed this tutorial and learned pretty solution to work with angular (and .netcore). I just have a problem!
When I create a service like this:
import { Injectable } from '@angular/core'
import { Http } from '@angular/http'
import 'rxjs/RX'
import { AccountSummary } from './account-summary.type'
import { AccountDetail } from './account-detail.type'
import { AccountType } from './account-type.enum'
@Injectable()
export class AccountService
{
    constructor(private http : Http)
    {
     }
getAccountSummeries()
{
    debugger
    return this.http.get('api/Bank/GetAccountSummeries')
        .map(response => response.json() as AccountSummary[])
        .toPromise();
}
}
and import it in app.module.share.ts file:
   .
   .
import { AccountService } from './components/shared/account.service' //Here<<
export const sharedConfig: NgModule = {
    bootstrap: [AppComponent],
    //Namespace Off Components:
    declarations: [
        AppComponent,
        NavMenuComponent,
        CounterComponent,
        FetchDataComponent,
        HomeComponent,
        AccountlistComponent,
        AccountSummaryComponent,
        ExampleComponent,
        FormatAccountNumberPipe,
        HeaderComponent
    ],
    imports: [
        RouterModule.forRoot([
         //paths...
        ])
    ],
    providers: [AccountService] //Here<<<<<<<<<<<<<<<<<<<<<
};
iv got this error when i ran the application:
Exception: Call to Node module failed with error: Error: Uncaught (in promise): Error: No provider for AccountService! Error: No provider for AccountService! at Error (native)
I use my service like this:
import { Component } from '@angular/core';
import { AccountSummary } from '../../shared/account-summary.type'
import { AccountType } from '../../shared/account-type.enum'
import { AccountService } from '../../shared/account.service'
@Component({
    selector: 'account-list',
    templateUrl: './account-list.component.html'
})
export class AccountlistComponent {
    cashAccounts: AccountSummary[];
    creditAccounts: AccountSummary[];
    constructor(private accountService: AccountService) { 
    }
    ngOninit() {
        this.accountService.getAccountSummeries().then(accounts => { 
        this.cashAccounts = accounts })
    }
}