I am trying to code share in my project between a web and mobile app version.
I have a component that requires programmatic navigation and therefore I need to inject the Angular Router (from '@angular/router') for the web version and NativeScript RouterExtensions (from '@nativescript/angular') for the mobile version. Is there a recommended way to "dynamically" inject a dependency into a component, so that each target that is compiled for gets the correct dependency?
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…