angular-hybrid
angular-hybrid copied to clipboard
Can't set useHash to true in UIRouterUpgradeModule.forRoot
For some reason, we can't use the useHash property of UIRouterModule in UIRouterUpgradeModule.
The UIRouterModule.forRoot expect an interface of RootModule which supports useHash, while UIRouterUpgradeModule.forRoot expects an interface of NgHybridStatesModule which extends StatesModule and does not support useHash
Temporary solution is to manually provide the location strategy to the app. In your root module add the following:
import { LocationStrategy, HashLocationStrategy } from '@angular/common';
@NgModule({
...,
providers: [
{
provide: LocationStrategy,
useClass: HashLocationStrategy,
},
],
})
Hi @roypeled , If the above solution helped , Can you please your the solution that will be very kind of you . I am not able to do deep linking in Angular AngularJS Hybrid App using UI RouterUpgradeModule
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. This does not mean that the issue is invalid. Valid issues may be reopened. Thank you for your contributions.