Does anyone know how to display images using Angular? I am currently utilizing the pic controller in an AngularJS file. Any assistance would be greatly appreciated.
HTML CODE
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width">
<title></title>
<link rel="manifest" href="manifest.json">
<link href="lib/ionic/css/ionic.css" rel="stylesheet">
<link href="css/style.css" rel="stylesheet">
<script src="lib/ionic/js/ionic.bundle.js"></script>
<script src="cordova.js"></script>
<script src="js/app.js"></script>
<link href="css/animate.css" rel="stylesheet">
</head>
<body ng-app="starter" >
<ion-pane>
<div class="bar bar-header bar-dark">
<button class="button button-icon icon ion-navicon"></button>
<h1 class="title">AdsCafe</h1>
</div>
</ion-pane>
<div ng-controller="pic" >
<ion-content>
<img collection-repeat="photo in pic.photos"
item-height="33%" item-width="33%"
ng-src="{{photo}}">
</ion-content>
</div>
</body>
</html>
Code To set angular array to proper controller
ANGULAR JS CODE
angular.module('starter', ['ionic'])
.controller('pic', function() {
this.photos = ['../img/a.gif','../img/b.gif','../img/c.gif','../img/d.gif','../img/qw.gif'];
];
});