I'm trying to show a photo when someone selects it for an input. Now I might be over simplyfying angularjs too much but I was hoping that this code would work.
<div ng-app="app">
... html stuff ...
<div ng-controller="imgCtrl">
<input ng-model="imageSource" type="file"></input>
<img ng-src="{|imageSource|}"></img>
</div>
</div> end of app
Where my angularjs file is as follows
var app = angular.module('app',[]).config(function($interpolateProvider){
$interpolateProvider.startSymbol('{|');
$interpolateProvider.endSymbol('|}');
}
);
var imgCtrl = function ($scope,$http){
$scope.wall = _wall;
};
clientDashboard.controller('imgCtrl',imgCtrl);
Unfortunately, nothing is happening and I can't see my updated image. Do I really have to write boiler plate code for this?