小编Vin*_*ari的帖子

位置2的文字异常

我在html页面上显示时遇到此错误,我以数组形式返回日期。如果我想只显示将来的月份和年份,那应该怎么办?现在我想返回整个日期,所以html上有错误我正在显示date2 [i]的ngmodel中的p-calendar标签中的页面,其中我是来自p-datalist的索引,我在html页面上遇到了错误

educationform.component.html:298错误错误:Object.debugCheckAndUpdateView处callWithDebugContext(services.js:871)处viewWrappedDebugError(errors.js:42)处位置2处的文字异常[如ViewRef_处的checkAndUpdateView](services.js:385) ZoneDelegate.invoke(区域)的eval(application_ref.js:575)的Array.forEach()处的val(application_ref.js:742)的.detectChanges(refs.js:508) .js?1534930465821:388),位于Object.onInvoke(ng_zone.js:594)View_EducationFormComponent_1 @ educationform.component.html:298 educationform.component.html:298错误上下文DebugContext_

<p-calendar [(ngModel)]="date2[i]" formControlName="startdate" [monthNavigator]="true" [yearNavigator]="true" yearRange="1950:2040"
                                    [showIcon]="true" dateFormat="dd.mm.yy" name="calendar"></p-calendar>
Run Code Online (Sandbox Code Playgroud)

Person.js

{
"EducationDegrees":[{

                "EducationId":1001,
                "InstituteName":"SPIT",
                "EducationType":"Professional",
                "Degree":"Mca",
                "University":"Mumbai",
                "MarksObtain":90,
                "OutOf":100,
                "Percentage":90,
                "PassingYear":"2016",
                "Stream":"Computer Science",
                "Grade":"A",
                "CourseDuration":3,
                "StartDate":"2005-05-05",
                "ExpectedEndDate":"4/2018",
                "ActualEndDate":"4/2018"

        }],
}
Run Code Online (Sandbox Code Playgroud)

education.component.html

<p-calendar [(ngModel)]="date2[i]" formControlName="startdate" [monthNavigator]="true" [yearNavigator]="true" yearRange="1950:2040"
                                    [showIcon]="true" dateFormat="dd.mm.yy" name="calendar"></p-calendar>
Run Code Online (Sandbox Code Playgroud)

教育组成部分

import { Component, OnInit } from '@angular/core';
import {SelectItem} from 'primeng/api';
import { Message } from 'primeng/components/common/api';
import { FormGroup, FormBuilder, FormControl, Validators } from '@angular/forms';
import { PersonListService,Person, EducationDegree} from …
Run Code Online (Sandbox Code Playgroud)

angular

4
推荐指数
1
解决办法
5819
查看次数

标签 统计

angular ×1