Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/vim/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 错误:(SystemJS)Angular2 Plnkr中的XHR错误(404) 错误: 指数_Javascript_Angular_Typescript_Plnkr.co - Fatal编程技术网

Javascript 错误:(SystemJS)Angular2 Plnkr中的XHR错误(404) 错误: 指数

Javascript 错误:(SystemJS)Angular2 Plnkr中的XHR错误(404) 错误: 指数,javascript,angular,typescript,plnkr.co,Javascript,Angular,Typescript,Plnkr.co,将我的配置重命名为src/config,但错误仍然存在。替换为。在index.html文件中 你试过我的答案了吗​ 在下面 <!DOCTYPE html> <html> <head> <base href="/"> <title>Angular 2.1.2 + TypeScript Starter Kit</title> <meta charset="UTF-8"> <meta name=

将我的配置重命名为src/config,但错误仍然存在。

替换为。在index.html文件中


你试过我的答案了吗​ 在下面
<!DOCTYPE html>
<html>

<head>
  <base href="/">
  <title>Angular 2.1.2 + TypeScript Starter Kit</title>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">

  <script src="https://unpkg.com/zone.js@0.6.21/dist/zone.js"></script>
  <script src="https://unpkg.com/reflect-metadata@0.1.9/Reflect.js"></script>
  <script src="https://unpkg.com/systemjs@0.19.41/dist/system.js"></script>
  <script src="https://unpkg.com/typescript@2.1.4/lib/typescript.js"></script>
  <script src="config.js"></script>
  <script>
    System.import('app')
      .catch(console.error.bind(console));
  </script>
</head>

<body>
  <my-app>
    loading...
  </my-app>
</body>

</html>
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { FormsModule } from '@angular/forms';
import { RouterModule } from '@angular/router';

import { routes } from './app.routing';

import { AppComponent } from './app.component';
import { LoginComponent } from './login/login.component';
// import { AuthService } from './shared/services/auth.service';


@NgModule({
  imports: [
    BrowserModule,
    FormsModule,
    RouterModule.forRoot(routes)
  ],
  declarations: [
    AppComponent,
    LoginComponent
  ],
  providers: [
    // AuthService,
  ],
  bootstrap: [ AppComponent ]
})
export class AppModule {}
<!DOCTYPE html>
<html>

<head>
  <base href=".">
  <title>Angular 2.1.2 + TypeScript Starter Kit</title>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">

  <script src="https://unpkg.com/zone.js@0.6.21/dist/zone.js"></script>
  <script src="https://unpkg.com/reflect-metadata@0.1.9/Reflect.js"></script>
  <script src="https://unpkg.com/systemjs@0.19.41/dist/system.js"></script>
  <script src="https://unpkg.com/typescript@2.1.4/lib/typescript.js"></script>
  <script src="config.js"></script>
  <script>
    System.import('app')
      .catch(console.error.bind(console));
  </script>
</head>

<body>
  <my-app>
    loading...
  </my-app>
</body>

</html>