article-details.controller.js 717 B

1234567891011121314151617181920212223
  1. app.controller('ArticleDetails', ['$scope', '$routeParams', 'articles.repository',
  2. function($scope, $routeParams, articlesRepository) {
  3. var articleId = $routeParams.id,
  4. articleModel = {};
  5. articlesRepository.getArticleById(articleId).then(function(response) {
  6. $scope.article = response.data;
  7. $scope.article.date = new Date($scope.article.date);
  8. }, function(error) {});
  9. $scope.delay = 4000;
  10. $scope.slides = [
  11. { 'image': 'image/users-photos/0001.jpg' },
  12. { 'image': 'image/users-photos/0002.jpg' },
  13. { 'image': 'image/users-photos/0003.jpg' },
  14. { 'image': 'image/users-photos/0004.jpg' }
  15. ];
  16. }]);
  17. // https://github.com/esvit/bz-slider/blob/master/examples/demo1.html