You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

articlesview.controller.js 782B

1234567891011121314151617181920212223
  1. angular.module('app')
  2. .controller('articlesViewController', ['$scope', '$stateParams', '$mdDialog', 'articlesBusiness', 'luBusyBusiness', 'AppUtilsBusiness',
  3. function($scope, $stateParams, $mdDialog, articlesBusiness, luBusyBusiness, AppUtilsBusiness) {
  4. $scope.busy = luBusyBusiness.reset();
  5. $scope.item = null;
  6. $scope.appUtils = AppUtilsBusiness;
  7. $scope.load = function()
  8. {
  9. articlesBusiness.getSingleById($stateParams.id, 'articles.view').then(function(data)
  10. {
  11. $scope.item = data;
  12. }, function (error) {});
  13. };
  14. if ($stateParams.item == null) {
  15. $scope.load();
  16. }
  17. else {
  18. $scope.item = $stateParams.item;
  19. }
  20. }]);