setUpLocationSync

From Get docs
< @angular/router‎ | upgradeAngular/docs/9/api/router/upgrade/setuplocationsync


setUpLocationSync

function

Sets up a location change listener to trigger history.pushState. Works around the problem that onPopState does not trigger history.pushState. Must be called after calling UpgradeModule.bootstrap.

setUpLocationSync(ngUpgrade: UpgradeModule, urlType: "path" | "hash" = 'path')

Parameters
ngUpgrade UpgradeModule The upgrade NgModule.
urlType "hash"

The location strategy.

Optional. Default is 'path'.


See also

  • HashLocationStrategy
  • PathLocationStrategy


© 2010–2020 Google, Inc.
Licensed under the Creative Commons Attribution License 4.0.
https://v9.angular.io/api/router/upgrade/setUpLocationSync