app.controller('ArticleDetails', ['$scope', '$routeParams', 'articles.repository', function($scope, $routeParams, articlesRepository) { var articleId = $routeParams.id, articleModel = {}; articlesRepository.getArticleById(articleId).then(function(response) { $scope.article = response.data; $scope.article.date = new Date($scope.article.date); }, function(error) {}); $scope.delay = 4000; $scope.slides = [ { 'image': 'image/users-photos/0001.jpg' }, { 'image': 'image/users-photos/0002.jpg' }, { 'image': 'image/users-photos/0003.jpg' }, { 'image': 'image/users-photos/0004.jpg' } ]; }]); // https://github.com/esvit/bz-slider/blob/master/examples/demo1.html