import { Component, AfterViewInit, OnInit } from '@angular/core'; import { Router } from '@angular/router'; import { ApplicationService } from '../services/application.service'; declare var jQuery: any; @Component({ templateUrl: './app/components/add-discount-code.component.html' }) export class AddDiscountCodeComponent implements AfterViewInit, OnInit { constructor(private application: ApplicationService, private router: Router) { } ngAfterViewInit(): void { this.initializeUIElements(); jQuery(function () { jQuery('#datetimepicker1, #datetimepicker2').datetimepicker({ //language: 'pt-BR' }); }); } initializeUIElements(): void { } ngOnInit(): void { /*if (this.application.currentUser == null) { this.router.navigate(['/login']); }*/ } showAlert(id: string): void { jQuery('#' + id).modal('show'); } }