-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.component.ts
44 lines (42 loc) · 1.13 KB
/
app.component.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
import { Component, OnInit } from '@angular/core';
import { Router, ActivatedRoute, Params } from '@angular/router';
import { AppService } from './app.service';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
})
export class AppComponent implements OnInit {
displayDate = new Date().toLocaleDateString();
title = 'Data Scaffolding and Detail Screen Roughouts w Lazy Loading modules - Day 8 build- 3';
pages= [''];
showbuttons = false;
constructor(
private appservice: AppService,
private route : ActivatedRoute,
private router : Router
) {
}
getAllTables(): void {
this.appservice
.getAllTables()
.then(pages => this.pages = pages);
}
onClickAdmin(admin){
admin = this.appservice.onAdmin(admin) ;
}
onClick2(showbuttons){
// this.router.navigate(['/events','1']);
this.router.navigateByUrl('./events/1');
}
onClick(showbuttons){
return !showbuttons;
}
onChange(page:string){
const lowercasepage = page.toLowerCase();
this.router.navigate([lowercasepage]);
}
ngOnInit(): void {
this.getAllTables();
}
}