在这里,我想显示客户列表,因为我在该类中编写了一个服务类,编写了一个函数getCustomer()
data.service.ts
// @Injectable() // comment to this line in service if we are inject service in component
export class DataService {
constructor(public http: Http) { }
getCustomers(): Promise<ICustomer[]> {
return this.htt
我试图使用两种不同的组件,基于浏览器或服务器。我正试图跟随。
// example.component.ts
import { Component } from '@angular/core';
@Component({
selector: 'example-component',
template: `<library-component></library-component>`, // this is provided by a third-party lib
// that causes issues renderi