StackOverflow 文档 AngularJS 教程 内置指令 ngSrc ngSrc Created: November-22, 2018 在 src 属性中使用像 {{hash}} 这样的 Angular 标记是行不通的。浏览器将使用文字文本 {{hash}} 从 URL 中获取,直到 Angular 替换 {{hash}} 中的表达式。ng-src 指令覆盖 image 标签元素的原始 src 属性并解决问题 <div ng-init="pic = 'pic_angular.jpg'"> <h1>Angular</h1> <img ng-src="{{pic}}"> </div> ngListngClass