Understanding AngularJS ng-src

前端 未结 6 1965
猫巷女王i
猫巷女王i 2020-12-03 09:51

As explained here, the angularjs directive ng-src is used to prevent the browser from loading the resource (e.g. image) before the handlebars get parsed. I\'m currently usin

6条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-03 10:38

    In the latest, you can evaluate it like this:

    ng-src="{{ methodThatReturnsString() }}"
    

提交回复
热议问题