I'm new to Angular.js which is why this question might be a very basic one but I would like to know how I can display elements via $scope.
Very simple:
<div id="view" ng-controller="images">{{ image }}</div>
and
function images($scope) {
$scope.image = '<img src="img/file.png">';
}
in this example it will only display the image tag as a string. Obviously one could to
<div id="view" ng-controller="images"><img src="{{ image }}"></div>
and use the source as variable
$scope.image = 'img/file.png';
but thats not what I am searching for. Is it possible to display elements as DOM element, not as a string.
<img src="{{ image }}">because the dom will be loaded before the{{ image }}will be evaluated (or something like that. You have to useng-src. I know thats not your question but i just wanted to let you know before you go on<img src="{{ image }}">and it works fine though.