本文整理汇总了TypeScript中hasher.changed.add方法的典型用法代码示例。如果您正苦于以下问题:TypeScript changed.add方法的具体用法?TypeScript changed.add怎么用?TypeScript changed.add使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类hasher.changed
的用法示例。
在下文中一共展示了changed.add方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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));
}
示例2: activateCrossroads
private activateCrossroads() {
crossroads.normalizeFn = crossroads.NORM_AS_OBJECT;
hasher.initialized.add(this.parseHash);
hasher.changed.add(this.changeHash);
hasher.init();
}