<div ng-app="" ng-init="firstName='John'"> <p>姓名为 <span ng-bind="firstName"></span></p> </div>
ng-bind 指令把应用程序变量 name 绑定到某个段落的 innerHTML。 原文链接:https://www.f2er.com/angularjs/147510.html
<div ng-app="" ng-init="firstName='John'"> <p>姓名为 <span ng-bind="firstName"></span></p> </div>