diff --git a/angular.json b/angular.json index 8967106..ec7fccb 100644 --- a/angular.json +++ b/angular.json @@ -24,9 +24,12 @@ ], "styles": [ "src/styles.css", - "node_modules/bootstrap/dist/css/bootstrap.min.css" + "node_modules/bootstrap/dist/css/bootstrap.min.css", + "node_modules/font-awesome/css/font-awesome.min.css", + "node_modules/ladda/dist/ladda.min.css" ], "scripts": [ + "node_modules/jquery/jquery.min.js", "node_modules/bootstrap/dist/js/bootstrap.min.js" ] }, diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index 97abdb5..880c149 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -6,7 +6,7 @@ import { LoginComponent } from './login/login.component'; import { NgbModal } from '@ng-bootstrap/ng-bootstrap'; const routes: Routes = [ - { path: 'comprobantes', component: ComprobantesComponent, pathMatch: 'full' }, + { path: 'comprobantes', component: ComprobantesComponent}, { path: '', redirectTo: 'home', pathMatch: 'full' }, { path: 'home', component: AppBotonera }, { path: 'login', component: LoginComponent } @@ -18,11 +18,11 @@ const routes: Routes = [ }) export class AppRoutingModule { - constructor(private router: Router, private modalService: NgbModal) { + constructor(public router: Router, public modalService: NgbModal) { - // this.router.events.subscribe(() => { - // this.modalService.dismissAll(); - // }); + this.router.events.subscribe(() => { + this.modalService.dismissAll(); + }); } } diff --git a/src/app/botonera/botonera.component.html b/src/app/botonera/botonera.component.html index 5bfd933..acac0a5 100644 --- a/src/app/botonera/botonera.component.html +++ b/src/app/botonera/botonera.component.html @@ -3,7 +3,7 @@
- + Lista comprobantes
diff --git a/src/app/botonera/botonera.component.ts b/src/app/botonera/botonera.component.ts index e93986f..93bea56 100644 --- a/src/app/botonera/botonera.component.ts +++ b/src/app/botonera/botonera.component.ts @@ -1,5 +1,6 @@ -import { Component } from '@angular/core'; +import { Component, NgZone } from '@angular/core'; import { BotonServiceService } from 'src/app/boton-service.service'; +import { Router } from '@angular/router'; @Component({ selector: 'app-botonera', @@ -11,8 +12,16 @@ export class AppBotonera { botones = new BotonServiceService().getBotones(); paginas = [1]; + constructor(public router: Router, private ngZone: NgZone) { } + showTerminal() { alert('No disponible aún'); } + comprobantes() { + this.ngZone.run(() => { + this.router.navigate(['/comprobantes']); + }); + } + } diff --git a/src/styles.css b/src/styles.css index 1e37ef1..d96b17a 100644 --- a/src/styles.css +++ b/src/styles.css @@ -1,8 +1,5 @@ /* You can add global styles to this file, and also import other style files */ -@import '../node_modules/font-awesome/css/font-awesome.min.css'; -@import '../node_modules/ladda/dist/ladda.min.css'; -@import '../node_modules/bootstrap/dist/css/bootstrap.min.css'; body { - background-color: #cccccc; + background-color: #cccccc !important; }