@angular/router#Navigation TypeScript Examples

The following examples show how to use @angular/router#Navigation. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: compose-email.component.ts    From careydevelopmentcrm with MIT License 6 votes vote down vote up
constructor(private fb: FormBuilder, private emailService: EmailService,
    private userService: UserService, private alertService: AlertService,
    private router: Router) {

    let nav: Navigation = this.router.getCurrentNavigation();

    if (nav.extras && nav.extras.state && nav.extras.state.currentEmail) {
      this.replyToEmail = nav.extras.state.currentEmail as Email;
    }
  }