mast3rd3mon mast3rd3mon - 1 year ago 98
AngularJS Question

This.routerExtensions.back() to call a method/function

So for my app, I need to be able to do this.router.back (or whatever the correct syntax would be). I did

import {Router} from "@angular/router";
and added
constructor(private router: Router) { }
. How do I do a navigate.back?

Now that I have navigated back, how do I get a method/function to run when on the page I navigate back to?

Answer Source

import { RouterExtensions } from "nativescript-angular/router";

constructor(private routerExtensions: RouterExtensions){}


Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download