0

I am using angular-ui-router and angular-material modal. and my state code is following.

angular.module('app.campaign', [])
    .config(['$stateProvider', function($stateProvider) {
        $stateProvider
            .state("campaigns", {
                url: "/campaigns",
                ...
            })
            .state("campaigns.add", {
                url: "/add",
                onEnter: ['$state', '$mdDialog',  CampaignAddCtrl]
            });
    }]);

function CampaignAddCtrl($state, $mdDialog) {
    console.log($state.$current.parent.locals); // log output attached image

    $mdDialog.show({
        controller: 'CampaignAddModal',
        templateUrl: 'views/campaigns/add.html',
        targetEvent: null,
        clickOutsideToClose: false
    });
}

img Now the problem is that, as you can see in the image it contatins @: Object, now if it try using console.log($state.$current.parent.locals.@); it gives me ILLEGAL TOKEN error. my question is how do it access it, I want to access the $scope variable inside @.

Salal Aslam
  • 1,367
  • 4
  • 16
  • 32

0 Answers0