当前位置: 首页>>代码示例>>TypeScript>>正文


TypeScript hasher.changed类代码示例

本文整理汇总了TypeScript中hasher.changed的典型用法代码示例。如果您正苦于以下问题:TypeScript changed类的具体用法?TypeScript changed怎么用?TypeScript changed使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了changed类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。

示例1: constructor

    private constructor(private modelDescriptorService: ModelDescriptorService,
                        private eventDispatcherService: EventDispatcherService,
                        private middlewareClient: MiddlewareClient,
                        private datastoreService: DatastoreService,
                        private sectionRoute: SectionRoute,
                        private volumeRoute: VolumeRoute,
                        private shareRoute: ShareRoute,
                        private snapshotRoute: SnapshotRoute,
                        private datasetRoute: DatasetRoute,
                        private calendarRoute: CalendarRoute,
                        private systemRoute: SystemRoute,
                        private serviceRoute: ServicesRoute,
                        private peeringRoute: PeeringRoute,
                        private networkRoute: NetworkRoute,
                        private dockerRoute: DockerRoute,
                        private replicationRoute: ReplicationRoute) {
        this.currentStacks = new Map<string, Array<any>>();
        this.taskStacks = immutable.Map<number|string, Array<any>>();
        this.sectionRouters = new Map<string, any>()
            .set('accounts', AccountsRoute.getInstance())
            .set('vms', VmsRoute.getInstance());

        this.eventDispatcherService.addEventListener('taskSubmitted', this.handleTaskSubmitted.bind(this));
        this.eventDispatcherService.addEventListener('taskCreated', this.handleTaskCreated.bind(this));
        this.loadRoutes();
        hasher.prependHash = '!';
        hasher.changed.add(this.handleHashChange.bind(this));
    }
开发者ID:pchaussalet,项目名称:gui,代码行数:28,代码来源:routing-service.ts

示例2: activateCrossroads

	private activateCrossroads() {

		crossroads.normalizeFn = crossroads.NORM_AS_OBJECT;

		hasher.initialized.add(this.parseHash);
		hasher.changed.add(this.changeHash);
		hasher.init();
	}
开发者ID:robertsundstrom,项目名称:express-knockout-spa,代码行数:8,代码来源:router.ts

示例3: resolve

 return new Promise<Array<any>>((resolve) => {
     let stack = this.currentStacks.get(sectionId);
     this.changeHash(_.last(stack).path);
     hasher.changed.addOnce(this.handleTaskHashChange.bind(this));
     resolve(stack);
 });
开发者ID:pchaussalet,项目名称:gui,代码行数:6,代码来源:routing-service.ts


注:本文中的hasher.changed类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。