app.component.html
价格:$ {{adultOption}}
app.component.ts
从'@ angular / core'导入{Component,OnInit};
@零件({
选择器:“ my-app”,
templateUrl:“ ./ app.component.html”,
styleUrls:['./ app.component.css']
})
导出类AppComponent实现OnInit {
db = [
{
“ id”:“ 1”,
“ product_name”:“卡纳塔克邦6天”,
“州”:[“ Karnataka”],
“城市”:[“班加罗尔”],
“单价”:500,
“ twinPrice”:800,
“ triplePrice”:1100
},
];
包装:任何;
filterData = [];
adultOption = 0;
htmlCode;
ngOnInit(){
this.packageList();
this.create_accomodation(1);
}
packageList(){
for(让i = 0; i
住宿'+ i +'