(function() {
  'use strict';

  angular
    .module('fb-marketings')
    .controller('FbCampaignDetailsController', FbCampaignDetailsController);

  FbCampaignDetailsController.$inject = ['$scope', '$stateParams', 'FbCampaignsService'];

  function FbCampaignDetailsController($scope, $stateParams, FbCampaignsService) {
    var vm = this;

    var campaignGroupId = $stateParams.campaignGroupId;

    init();

    function 
() {
      $scope.currentCampaign = null;
      FbCampaignsService.getCampaignById(campaignGroupId,
        function(response) {
          $scope.currentCampaign = response;
        }, function(response) {
          console.log(response);
        });

      $scope.adsetsList = null;
      FbCampaignsService.getAdsetsList(campaignGroupId,
        function(response) {
          $scope.adsetsList = response;
        }, function(response) {
          console.log(response);
        });
    }
  }
})();

init