I've built a webapp using ionic. I'm trying to import the MSALModule into my app. According to the tutorials etc I've found online, you have to add following to app module :
MsalModule.forRoot({
clientID: OAuthSettings.appId
}),
currently its giving me the following error when I try to go to the page where it is used.
We have a generic Error: Error: Uncaught (in promise): Error: StaticInjectorError(AppModule)[MsalGuard -> Router]:
StaticInjectorError(Platform: core)[MsalGuard -> Router]:
NullInjectorError: No provider for Router!
Error: StaticInjectorError(AppModule)[MsalGuard -> Router]:
StaticInjectorError(Platform: core)[MsalGuard -> Router]:
NullInjectorError: No provider for Router!
at _NullInjector.get (core.js:994)
at resolveToken (core.js:1292)
at tryResolveToken (core.js:1234)
at StaticInjector.get (core.js:1102)
at resolveToken (core.js:1292)
at tryResolveToken (core.js:1234)
at StaticInjector.get (core.js:1102)
at resolveNgModuleDep (core.js:10847)
at _createClass (core.js:10888)
at _createProviderInstance$1 (core.js:10858)
at c (polyfills.js:3)
at Object.reject (polyfills.js:3)
at NavControllerBase._fireError (nav-controller-base.js:223)
at NavControllerBase._failed (nav-controller-base.js:216)
at nav-controller-base.js:263
at t.invoke (polyfills.js:3)
at Object.onInvoke (core.js:4733)
at t.invoke (polyfills.js:3)
at r.run (polyfills.js:3)
at polyfills.js:3
I don't have the routing module imported cos i'm not using angular (or ionic) routing in the app. Is there a way to get rid of this error without using routing? i.e. can I use MSAL without setting up routing in my app?