实例在 angularproject:未完成
<div class="back" >
<a [routerLink]="[ '/home']">返回</a>
</div>
<div class="p_content">
<div class="p_info">
<img [src]="domain+list.img_url" />
<h2>{{list.title}}</h2>
<p class="price">{{list.price}}/份</p>
</div>
<div class="p_detial">
<h3>
商品详情
</h3>
<div class="p_content" [innerHTML]="list.content">
</div>
</div>
</div>
<footer class="pfooter">
<div class="cart">
<strong>数量:</strong>
<div class="cart_num">
<div class="input_left">-</div>
<div class="input_center">
<input type="text" readonly="readonly" value="1" name="num" id="num" />
</div>
<div class="input_right">+</div>
</div>
</div>
<button class="addcart">加入购物车</button>
</footer>
<div class="back" >
<a [routerLink]="[ '/home']">返回</a>
</div>
<div class="p_content">
<div class="p_info">
<img [src]="domain+list[0].img_url" />
<h2>{{list[0].title}}</h2>
<p class="price">{{list[0].price}}/份</p>
</div>
<div class="p_detial">
<h3>
商品详情
</h3>
<div class="p_content" [innerHTML]="list[0].content">
</div>
</div>
</div>
<footer class="pfooter">
<div class="cart">
<strong>数量:</strong>
<div class="cart_num">
<div class="input_left">-</div>
<div class="input_center">
<input type="text" readonly="readonly" value="1" name="num" id="num" />
</div>
<div class="input_right">+</div>
</div>
</div>
<button class="addcart">加入购物车</button>
</footer>
<div class="back" >
<a [routerLink]="[ '/home']">返回</a>
</div>
<div class="p_content">
<div class="p_info">
<img [src]="domain+list['img_url']" />
<h2>{{list['title']}}</h2>
<p class="price">{{list['price']}}/份</p>
</div>
<div class="p_detial">
<h3>
商品详情
</h3>
<div class="p_content" [innerHTML]="list['content']">
</div>
</div>
</div>
<footer class="pfooter">
<div class="cart">
<strong>数量:</strong>
<div class="cart_num">
<div class="input_left">-</div>
<div class="input_center">
<input type="text" readonly="readonly" value="1" name="num" id="num" />
</div>
<div class="input_right">+</div>
</div>
</div>
<button class="addcart">加入购物车</button>
</footer>
<div class="back" >
<a [routerLink]="[ '/home']">返回</a>
</div>
<div class="p_content">
<div class="p_info" >
<img src="assets/images/product.jpg"/>
<h2>小炒肉</h2>
<p class="price">22.00/份</p>
</div>
<div class="p_detial">
<h3>
商品详情
</h3>
<div class="p_content">
<img src="assets/images/product.jpg"/>
<br />
<p>
韩国辣酱海鲜炒面,青椒炒牛肉,芦笋腰果炒虾仁,『家常料理』简单又好吃的辣炒起司年糕鸡排
</p>
<br />
<p>
韩国辣酱海鲜炒面,青椒炒牛肉,芦笋腰果炒虾仁,『家常料理』简单又好吃的辣炒起司年糕鸡排
</p>
</div>
</div>
</div>
<br><br><br><br>
<footer class="pfooter">
<div class="cart">
<strong>数量:</strong>
<div class="cart_num">
<div class="input_left">-</div>
<div class="input_center">
<input type="text" readonly="readonly" value="1" name="num" id="num" />
</div>
<div class="input_right">+</div>
</div>
</div>
<button class="addcart">加入购物车</button>
</footer>