<html>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.9/angular.min.js"></script>
<body ng-app="">
<div ng-init="myVar = 'pic_angular.jpg'">
<h1>Angular</h1>
<img ng-srcset="{{myVar}}">
</div>
<p>This example could use the original srcset attribute, but with AngularJS code inside the value, it is better to use the ng-srcset attribute instead.</p>
</body>
</html>