{ "id": "api/router/upgrade/setUpLocationSync", "title": "setUpLocationSync", "contents": "\n\n
\n
\n
\n \n API > @angular/router > @angular/router/upgrade\n
\n \n
\n \n
\n

setUpLocationSynclink

\n \n \n \n \n \n
\n \n \n\n
\n \n
\n

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

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

The upgrade NgModule.

\n\n
\n \n urlType\n \"path\" | \"hash\"\n

The location strategy.

\n

Optional. Default is 'path'.

\n\n
\n\n \n\n\n \n\n \n
\n\n\n \n
\n

See alsolink

\n \n
\n\n\n \n\n\n\n \n\n\n
\n
\n\n\n" }