JSFiddle - React, Tailwind, and code Playground
by Sajeetharan Sinnathurai
HTML
<div ng-app>
<div ng-controller="AppCtrl">
<a href='#'><img ng-src="{{profilePhoto}}"/></a>
<button ng-click="changeLink()">Change Image</button>
</div>
</div>
JavaScript
function AppCtrl($rootScope) {
$rootScope.profilePhoto = 'https://farm4.staticflickr.com/3261/2801924702_ffbdeda927_d.jpg';
$rootScope.changeLink = function() {
$rootScope.profilePhoto = 'https://farm9.staticflickr.com/8455/8048926748_1bc624e5c9_d.jpg';
}
}