Commit c61f0efdba5e80bff5f88d69cb89b0ee526f90c9
1 parent
a7f7b8b259
Exists in
master
and in
1 other branch
espacios
Showing
1 changed file
with
2 additions
and
2 deletions
Show diff stats
src/js/controller.js
1 | angular.module('focaBotoneraLateral') | 1 | angular.module('focaBotoneraLateral') |
2 | .controller('focaBotoneraLateralController', [ | 2 | .controller('focaBotoneraLateralController', [ |
3 | '$scope', | 3 | '$scope', |
4 | '$location', | 4 | '$location', |
5 | '$window', | 5 | '$window', |
6 | 'focaBotoneraLateralService', | 6 | 'focaBotoneraLateralService', |
7 | function($scope, $location, $window, focaBotoneraLateralService) { | 7 | function($scope, $location, $window, focaBotoneraLateralService) { |
8 | 8 | ||
9 | $scope.botones = focaBotoneraLateralService.botones; | 9 | $scope.botones = focaBotoneraLateralService.botones; |
10 | 10 | ||
11 | $scope.cambioUsoTeclado = function() { | 11 | $scope.cambioUsoTeclado = function() { |
12 | $scope.$parent.cambioUsoTeclado(); | 12 | $scope.$parent.cambioUsoTeclado(); |
13 | }; | 13 | }; |
14 | 14 | ||
15 | $scope.salir = function() { | 15 | $scope.salir = function() { |
16 | $location.path('/'); | 16 | $location.path('/'); |
17 | }; | 17 | }; |
18 | 18 | ||
19 | $scope.cancelar = function() { | 19 | $scope.cancelar = function() { |
20 | if($scope.botones.pathCancelar){ | 20 | if($scope.botones.pathCancelar) { |
21 | $location.path($scope.botones.pathCancelar); | 21 | $location.path($scope.botones.pathCancelar); |
22 | }else{ | 22 | }else { |
23 | $window.history.back(); | 23 | $window.history.back(); |
24 | } | 24 | } |
25 | }; | 25 | }; |
26 | }]); | 26 | }]); |
27 | 27 |