在将代码与前端绑定并在此处显示一些数据但在此处未显示一些数据时,我对其进行了控制台操作,并在控制台中获取了所有数据,但未在html中显示。
this.route.paramMap.subscribe(param => {
if (param && param.keys.length > 0 && param.has("id")) {
this.tem.getOne(param.get("id")).subscribe(res => {
this.certifications = res.certifications;
this.educations = res.educations;
this.experiences = res.experiences;
this.publications = res.publications;
this.volunteer_experiences = res.volunteer_experiences;
this.projects = res.projects;
this.skills = res.skills;
this.introduction = res.introduction;
console.log(this.introduction.first_name);
});
} else {
this.router.navigate(["/"]);
}
});
这是html代码,但未显示 与前端绑定
<div class="ur-detail-wrap top-lay">
<div class="ur-detail-box">
<div class="ur-thumb">
<img src="{{introduction.picture}}" class="img-responsive" alt="" />
</div>
<div class="ur-caption">
<h4 class="ur-title">{{introduction.first_name}} {{introduction.last_name}}</h4>
<p class="ur-location">
<i class="ti-location-pin mrg-r-5"></i>{{introduction.location_name}}
</p>
<span class="ur-designation">{{introduction.headline}}</span>
<div class="rateing">
<i class="fa fa-star filled"></i>
<i class="fa fa-star filled"></i>
<i class="fa fa-star filled"></i>
<i class="fa fa-star filled"></i>
<i class="fa fa-star"></i>
</div>
</div>
</div>