@@ -46,7 +48,7 @@ export class HomeWorksapceComponent extends Utils
implements OnInit, AfterViewInit {
viewchartvar: boolean;
constructor(@Inject(DOCUMENT) public document: Document,
- private router: Router) {
+ private router: Router,private route: ActivatedRoute,private titleService: Title) {
super(document);
if (this.router.url == '/all') {
this.viewchartvar = false;
@@ -55,7 +57,10 @@ export class HomeWorksapceComponent extends Utils
}
}
- ngOnInit() {}
+ ngOnInit() {
+ this.titleService.setTitle(
+ this.route.snapshot.data.title,
+ );}
viewchartenable() {
this.viewchartvar = false;
diff --git a/src/app/view/view-routing.module.ts b/src/app/view/view-routing.module.ts
index df811f9..9690f7e 100755
--- a/src/app/view/view-routing.module.ts
+++ b/src/app/view/view-routing.module.ts
@@ -7,6 +7,9 @@ const viewRoutes: Routes = [
{
path: '',
loadChildren: './home/home.module#HomeModule',
+ data: {
+ title: 'Epic Explorer - Home',
+ },
},
{
path: 'all',
@@ -21,6 +24,9 @@ const siteRoutes: Routes = [
{
path: 'blockdetail/:hash',
loadChildren: './block-view/block-view.module#BlockViewModule',
+ data: {
+ title: 'Epic Explorer - Block',
+ },
},
{
path: 'chart',
diff --git a/src/assets/css/style.css b/src/assets/css/style.css
index c548b6d..d013216 100644
--- a/src/assets/css/style.css
+++ b/src/assets/css/style.css
@@ -288,6 +288,9 @@ a:focus {
padding: 20px;
transition: 0.3s linear all;
min-height: 100%;
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
}
.detail_div .count {
font-size: 25px;