normally you would define a custom protocol. say "myapp:". then in javascript you would navigate with this protocol: "myapp://action?p1=....". because of the custom protocol, the spa navigation will not pickup. you could use a fake domain (http://myapp/)
here is a sample (without the custom protocol, just add)