I have an image like:
console.log( $scope.image ); // <img alt="hello" class="form" src="demo.jpg">
I want to have the following output (just the text of alt
):
console.log( $scope.image ); // hello
There is an answer for jquery here. But I want to do the same in Angularjs
. Any idea?
Edit: Also $scope.image
contains more html.