controller.js 804 Bytes
angular.module('focaBotoneraLateral')
    .controller('focaBotoneraLateralController', [
        '$scope',
        '$location',
        '$window',
        'focaBotoneraLateralService',
        function($scope, $location, $window, focaBotoneraLateralService) {

            $scope.botones = focaBotoneraLateralService.botones;

            $scope.cambioUsoTeclado = function() {
                $scope.$parent.cambioUsoTeclado();
            };

            $scope.salir = function() {
                $location.path('/');
            };

            $scope.cancelar = function() {
                if($scope.botones.pathCancelar){
                    $location.path($scope.botones.pathCancelar);
                }else{
                    $window.history.back();
                }
            };
    }]);