import { Component, OnInit } from '@angular/core';
import { Router } from '@angular/router';
import { NgCortexService } from '@ng-cortex/core';

/** 应用索引页面 */
@Component({
  selector: 'nc-application-index',
  templateUrl: './nc-application-index.page.html',
  styleUrls: ['./nc-application-index.page.scss']
})
export class NcApplicationIndexPage implements OnInit {

  constructor(
    private _router: Router,
    private _ngCortexService: NgCortexService) { }

  /** 初始化后 */
  ngOnInit(): void {
    const route = this._router.url;
    if (this._ngCortexService.data.routeRecordList.length > 0) {
      this._ngCortexService.closeRoute(route);
    }
  }

}
