const ActivityComponent = {
    templateUrl: "/app/activity/activity.component.html",
    controller: function ($activity, api, $state) {
        let $ctrl = this;
        $ctrl.activity = null;

        $ctrl.$onInit = function () {

            if (!api.isLoggedIn()) {
                api.redirectToLogin();
            }
                                
            //$ctrl.activity = $activity.getCurrentActivity();
            $activity.getCurrentActivity().then(function(response){
                $ctrl.activity = response; 
            });
            
        }
    }
};