<html>
<script src="https://cdn.staticfile.net/angular.js/1.6.9/angular.min.js"></script>
<body ng-app="">
<div ng-init="myVar = '/i/pic/angular.jpg'">
<h1>Angular</h1>
<img ng-src="{{myVar}}">
</div>
<p>这个例子原本可以使用原生的 src 属性,但由于属性值中包含了 AngularJS 代码,因此最好使用 ng-src 属性来代替。</p>
</body>
</html>