首页 > 解决方案 > 如何获取作为对象对象显示到控制台的对象的属性

问题描述

我有这样的功能。

monthChanger(event) {
                  console.log('monthChanged.............'+event); }

在模板中用作

  <ion-calendar [(ngModel)]="date"
                  (change)="onChange($event)"
                  [options]="options"
                  type="string"
                  format="YYYY-MM-DD"
                  readonly="true"
                  (monthChange)="monthChanger($event)"

                  >
    </ion-calendar>linked to template like this.

控制台只显示这样

在此处输入图像描述

我如何访问对象内部的属性。请帮助我。我的意思是数据字段和属性。

标签: angulartypescriptoop

解决方案


  console.log('monthChanged.............'+JSON.stringify(event)); 

推荐阅读