本文整理匯總了TypeScript中@uirouter/core.UrlService.sync方法的典型用法代碼示例。如果您正苦於以下問題:TypeScript UrlService.sync方法的具體用法?TypeScript UrlService.sync怎麽用?TypeScript UrlService.sync使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類@uirouter/core.UrlService
的用法示例。
在下文中一共展示了UrlService.sync方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: platformBrowserDynamic
platformBrowserDynamic().bootstrapModule(KyloModule).then(platformRef => {
const injector: Injector = platformRef.injector;
const upgrade = injector.get(UpgradeModule) as UpgradeModule;
// The DOM must be already be available
upgrade.bootstrap(document.body, ["kylo"]);
// Initialize the Angular Module (get() any UIRouter service from DI to initialize it)
const url: UrlService = injector.get(UIRouter).urlService;//getUIRouter(injector).urlService;
// Instruct UIRouter to listen to URL changes
url.listen();
url.sync();
});
示例2: startUIRouter
// Instruct UIRouter to listen to URL changes
function startUIRouter() {
urlService.listen();
urlService.sync();
}
示例3: startUIRouter
// Instruct UIRouter to listen to URL changes
function startUIRouter() {
url.listen();
url.sync();
}