小编Cha*_*ran的帖子

我正在使用 angular 7 从服务到组件获取 [object Object]

请帮助解决以下问题,这是我的模型类。我使用.pipe.map()import {map} fromrxjs/operators方法尝试了所有可能的方法,但仍然给出[object Object]

export class AppProfilesDetailsDO { 
  envName?: string;
  envDesc?: string;
  envIpAddress?: string;
  envProfileName?: string;
  envCrDeployed?: string;
  envUrl?: string;
  envAdminConsoleUrl?: string;
  envDbSchema?: string;
  envDbUserId?: string;
  envGisSchema?: string;    
  envPortNo?: number;
 }
Run Code Online (Sandbox Code Playgroud)

我的组件类

import { Component, OnInit } from '@angular/core';
import { ProfileserviceService } from './profileservice.service';
import { AppProfilesDetailsDO } from '../models/AppProfilesDetailsDO';

@Component({
    selector: 'app-profiledetails',
    templateUrl: './profiledetails.component.html',
    styleUrls: ['./profiledetails.component.css']
})
export class ProfiledetailsComponent implements OnInit {

appProfileData: AppProfilesDetailsDO[];

constructor(private profileService: ProfileserviceService) { this.appProfileData = [] } …
Run Code Online (Sandbox Code Playgroud)

javascript typescript angular

0
推荐指数
1
解决办法
84
查看次数

标签 统计

angular ×1

javascript ×1

typescript ×1