|
- import { Component, OnInit } from '@angular/core';
- import { NavigationEnd, Router } from '@angular/router';
- import { PartnerProfileService } from '../services/partner-profile.service';
-
- @Component({
- selector: 'app-dashboard',
- templateUrl: './dashboard.component.html',
- styleUrls: ['./dashboard.component.scss']
- })
- export class DashboardComponent implements OnInit {
- currentURL: string = '';
-
- constructor(
- private router: Router,
- private partnerProfileService: PartnerProfileService
- ) { }
-
- ngOnInit(): void {
- this.currentURL = this.router.url;
-
- this.router.events.subscribe((val) => {
- // see also
- if (val instanceof NavigationEnd) {
- this.currentURL = val.url;
- }
- });
-
- // this.partnerProfileService.getPartnersData().then(data => {
- // console.log(data);
- // })
- }
- }
|