Codeigniter Hello World程序的Angular 2运行完美.但是我发送错误"JSON输入的意外结束",同时从Angular 2向Codeigniter Controller发送Http get请求"Entry.php"Plunker代码在此链接:
https://plnkr.co/edit/MHVVkWwFqEggqSI5b6B2?p=info
同样的代码也粘贴在这里:app.module.ts
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { HttpModule } from "@angular/http";
import { AppComponent } from './app.component';
import { EntryService } from './entry.service';
@NgModule({
imports: [
BrowserModule,
HttpModule
],
declarations: [
AppComponent
],
exports: [ // export for the DemoModule
AppComponent
],
providers: [ EntryService],
bootstrap: [ AppComponent ]
})
export class AppModule { }
Run Code Online (Sandbox Code Playgroud)
app.component.ts
import { Component, OnInit} from '@angular/core';
import { …Run Code Online (Sandbox Code Playgroud)