How to use the @delon/abc.ReuseTabMatchMode.URL function in @delon/abc

To help you get started, we’ve selected a few @delon/abc examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github zLulus / NotePractice / Website / DotNetCore / CoreNgAlain / src / app / core / startup / startup.service.ts View on Github external
return new Promise((resolve, reject) => {
      // 设置reuseTabService.mode为ReuseTabMatchMode.URL
      // reuse-tab  是否重用页面,把这个页面排除了,所以只要跳转到别的页面 原tab就会消失
      // https://github.com/cipchk/ng-alain/issues/101
      this.reuseTabService.mode = ReuseTabMatchMode.URL;
      const excludes = new Array();
      excludes.push(new RegExp('/can-deactivate'));
      this.reuseTabService.excludes = excludes;

      zip(
        this.httpClient.get(`assets/tmp/i18n/${this.i18n.defaultLang}.json`),
        this.httpClient.get('assets/tmp/app-data.json'),
      )
        .pipe(
          // 接收其他拦截器后产生的异常消息
          catchError(([langData, appData]) => {
            resolve(null);
            return [langData, appData];
          }),
        )
        .subscribe(