Commit 1c76f818a5a99ff489f1110d87ca34d809864ec2
1 parent
0515fbb873
Exists in
master
fix ruta
Showing
5 changed files
with
21 additions
and
12 deletions
Show diff stats
angular.json
| ... | ... | @@ -24,9 +24,12 @@ |
| 24 | 24 | ], |
| 25 | 25 | "styles": [ |
| 26 | 26 | "src/styles.css", |
| 27 | - "node_modules/bootstrap/dist/css/bootstrap.min.css" | |
| 27 | + "node_modules/bootstrap/dist/css/bootstrap.min.css", | |
| 28 | + "node_modules/font-awesome/css/font-awesome.min.css", | |
| 29 | + "node_modules/ladda/dist/ladda.min.css" | |
| 28 | 30 | ], |
| 29 | 31 | "scripts": [ |
| 32 | + "node_modules/jquery/jquery.min.js", | |
| 30 | 33 | "node_modules/bootstrap/dist/js/bootstrap.min.js" |
| 31 | 34 | ] |
| 32 | 35 | }, |
src/app/app-routing.module.ts
| ... | ... | @@ -6,7 +6,7 @@ import { LoginComponent } from './login/login.component'; |
| 6 | 6 | import { NgbModal } from '@ng-bootstrap/ng-bootstrap'; |
| 7 | 7 | |
| 8 | 8 | const routes: Routes = [ |
| 9 | - { path: 'comprobantes', component: ComprobantesComponent, pathMatch: 'full' }, | |
| 9 | + { path: 'comprobantes', component: ComprobantesComponent}, | |
| 10 | 10 | { path: '', redirectTo: 'home', pathMatch: 'full' }, |
| 11 | 11 | { path: 'home', component: AppBotonera }, |
| 12 | 12 | { path: 'login', component: LoginComponent } |
| ... | ... | @@ -18,11 +18,11 @@ const routes: Routes = [ |
| 18 | 18 | }) |
| 19 | 19 | export class AppRoutingModule { |
| 20 | 20 | |
| 21 | - constructor(private router: Router, private modalService: NgbModal) { | |
| 21 | + constructor(public router: Router, public modalService: NgbModal) { | |
| 22 | 22 | |
| 23 | - // this.router.events.subscribe(() => { | |
| 24 | - // this.modalService.dismissAll(); | |
| 25 | - // }); | |
| 23 | + this.router.events.subscribe(() => { | |
| 24 | + this.modalService.dismissAll(); | |
| 25 | + }); | |
| 26 | 26 | } |
| 27 | 27 | |
| 28 | 28 | } |
src/app/botonera/botonera.component.html
src/app/botonera/botonera.component.ts
| 1 | -import { Component } from '@angular/core'; | |
| 1 | +import { Component, NgZone } from '@angular/core'; | |
| 2 | 2 | import { BotonServiceService } from 'src/app/boton-service.service'; |
| 3 | +import { Router } from '@angular/router'; | |
| 3 | 4 | |
| 4 | 5 | @Component({ |
| 5 | 6 | selector: 'app-botonera', |
| ... | ... | @@ -11,8 +12,16 @@ export class AppBotonera { |
| 11 | 12 | botones = new BotonServiceService().getBotones(); |
| 12 | 13 | paginas = [1]; |
| 13 | 14 | |
| 15 | + constructor(public router: Router, private ngZone: NgZone) { } | |
| 16 | + | |
| 14 | 17 | showTerminal() { |
| 15 | 18 | alert('No disponible aún'); |
| 16 | 19 | } |
| 17 | 20 | |
| 21 | + comprobantes() { | |
| 22 | + this.ngZone.run(() => { | |
| 23 | + this.router.navigate(['/comprobantes']); | |
| 24 | + }); | |
| 25 | + } | |
| 26 | + | |
| 18 | 27 | } |
src/styles.css
| 1 | 1 | /* You can add global styles to this file, and also import other style files */ |
| 2 | -@import '../node_modules/font-awesome/css/font-awesome.min.css'; | |
| 3 | -@import '../node_modules/ladda/dist/ladda.min.css'; | |
| 4 | -@import '../node_modules/bootstrap/dist/css/bootstrap.min.css'; | |
| 5 | 2 | |
| 6 | 3 | body { |
| 7 | - background-color: #cccccc; | |
| 4 | + background-color: #cccccc !important; | |
| 8 | 5 | } |