this.historyMode = function() {
debugger;
if($scope.mode === 'history') {
$scope.mode = 'init';
/**
* REMOVE EVENT LISTENER "EVENTS.ON_SEND_REQUEST" BEFORE ACTION
*
* */
params.makeAction($scope.controller, 'timeline_hide_mode');
}else {
$scope.mode = 'history';
unsetParamsMode();
params.makeAction($scope.controller, 'timeline_show_mode', $scope.timeline.range);
}
};
<div class="header-button" ng-class="mode === 'history' ? 'active' : ''" ng-click="ctrl.historyMode()">
<span class="ui-button-text">История</span>
</div>