Linked Questions

Popular Questions

How to Route to another component in same mat dialog

Asked by At

How to Route to another component in same mat dialog.

Image:-1 after putting values after putting values The same mat dialog should open the another component window.

Image:-2 The window to be navigated is coming in parent window The window to be navigated is coming in parent window This window which is coming in back should load in the mat dialog This window which is coming in back should load in the mat dialog pasting code which I am using for navigating.

 determinePopup(olpn: any, modeId:any) {
    console.log("modeId in determinePopup--->"+ modeId)
    console.log("this.modeId in determinePopup--->"+ this.modeId)
    if ((olpn.DestinationAddress.Country !== 'US' ||
      // (olpn.DestinationAddress.Country === 'US' && this.isStateInOptions(olpn.DestinationAddress.Country, ['AE', 'AP', 'AA']) && olpn.ModeId === 'PCL' )) || (olpn.ModeId !== 'PCL')) {
      (olpn.DestinationAddress.Country === 'US' && (olpn.DestinationAddress.State == 'AE' || olpn.DestinationAddress.State == 'AP' || olpn.DestinationAddress.State == 'AA'))) || (modeId !== 'PCL')) {
      // Redirect to PrintShippingLabels Component
      // this.router.navigate(['/finishPrintOlpn']);
      this.router.navigateByUrl("finishPrintOlpn?OlpnId=" + olpn.OlpnId + "&PrintCriteriaId=" + this.printCriteriaId)

    }
    else {
      // Redirect to WeighAndManifest Component 
      // Component isn't present yet
      console.log("Redirected to WeighAndManifest");
      this.router.navigateByUrl("manifest?OlpnId=" + olpn.OlpnId)
    }
  }

image3:- final output needed Output I want : opening component in same mat dialog opening component in same mat dialog

Related Questions