AngularJS 對象-ng-bind

<!DOCTYPE html>html

<html>app

<head>ide

<meta charset="utf-8">ui

<meta http-equiv="X-UA-Compatible" content="IE=edge">spa

<title></title>cdn

<link rel="stylesheet" href="">htm

</head>ip

<body>utf-8

<div ng-app="" ng-init="person={firstName:'xiao',lastName:'ming'}">get

<p>姓:<span ng-bind="person.firstName"></span></p>

<p>名:<span ng-bind="person.lastName"></span></p>

</div>

</body>

<script src="http://cdn.static.runoob.com/libs/angular.js/1.4.6/angular.min.js"></script>

</html>

QQ截圖20181015214409.jpg

相關文章
相關標籤/搜索