本文整理汇总了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();
}