本文整理匯總了TypeScript中aurelia-binding.ObserverLocator類的典型用法代碼示例。如果您正苦於以下問題:TypeScript ObserverLocator類的具體用法?TypeScript ObserverLocator怎麽用?TypeScript ObserverLocator使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
在下文中一共展示了ObserverLocator類的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: constructor
constructor(private _ol: ObserverLocator, private _loginService: LoginService, private _router: Router){
this.accessCommand = new DelegateCommand<any>(this.access.bind(this), this.canExecuteAccess.bind(this));
this._ol.getObserver(this, 'username').subscribe(this.inputChange.bind(this));
this._ol.getObserver(this, 'password').subscribe(this.inputChange.bind(this));
}
示例2: Contact
addNew(): void {
let contact = new Contact();
contact.id = this.getId();
contact.username = "username";
contact.email = "e-mail";
this.observerLocator.getObserver(contact, 'checked').subscribe(() => this.updateStorage());
this.contacts.push(contact);
this.updateStorage();
}
示例3:
return () => {
this.observerLocator.getObserver(context, property).unsubscribe(callback);
}
示例4:
this.contacts.forEach((e, i) => {
this.observerLocator.getObserver(e, 'checked').subscribe(() => this.updateStorage());
});