ng2

Question

  1. Unhandled Promise rejection: No base href set. Please provide a value for the APP_BASE_HREF

    页面添加

    1. httpService 自定义 需要在 app.component.ts 声明
      1
      2
      3
      4
      5
      6
      7
      8
      9
      10
      11
      12
      13
      import { Component } from '@angular/core';

      import { HttpService } from './httpService';

      @Component({
      moduleId: module.id,
      selector: 'app-root',
      providers: [HttpService]
      })

      export class AppComponent {
      constructor() {}
      }