本文整理汇总了TypeScript中twc/polymer.observe函数的典型用法代码示例。如果您正苦于以下问题:TypeScript observe函数的具体用法?TypeScript observe怎么用?TypeScript observe使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了observe函数的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的TypeScript代码示例。
示例1:
@observe('collection.*')
_collectionChanged(collection: any) {
TemplateUtil.render({
value: collection.base,
scope: 'hydra-collection'
}, this.$.table);
}
开发者ID:wikibus,项目名称:Augean.Console,代码行数:7,代码来源:hydra-collection.ts
示例2:
@observe('resource')
_getEntrypoint(resource: IHydraResource) {
resource.apiDocumentation.getEntrypoint()
.then((entrypoint: IHydraResponse) => {
this._setEntrypoint(entrypoint.root);
})
.catch(() => {
this._setEntrypoint({});
});
}
开发者ID:wikibus,项目名称:Augean.Console,代码行数:10,代码来源:side-menu.ts
示例3: getTitle
@observe('resource', 'propertyId')
getTitle(resource: IHydraResource, propertyId: string) {
if (resource && resource.apiDocumentation) {
let properties = resource.types.map((t: IClass) => resource.apiDocumentation.getProperties(t));
const supportedProps = Utils.flatten(properties);
const [ supportedProp, ...tail ] = supportedProps.filter((prop: ISupportedProperty) => prop.property.id === propertyId);
if (supportedProp) {
this._setSupportedProperty(supportedProp);
return;
}
}
this._setSupportedProperty(propertyId);
}
开发者ID:wikibus,项目名称:Augean.Console,代码行数:16,代码来源:property-label.ts
示例4: clearSelection
@observe('supportedOperations')
clearSelection() {
this.$.selectedOperation = null;
this.$.supportedOperations.value = '';
}
开发者ID:wikibus,项目名称:Augean.Console,代码行数:5,代码来源:supported-operations-viewer.ts
示例5: updateFabStyle
@observe('hasOperations')
updateFabStyle(hasOperations: boolean) {
this.updateStyles();
}
开发者ID:wikibus,项目名称:Augean.Console,代码行数:4,代码来源:operation-selector.ts
示例6: returnsObserver
@observe('supportedOperation.returns')
returnsObserver(returns:IClass) {
this._setHasReturns(!!returns && returns.id !== nothing);
setTitle.call(this, returns, this._setReturnsTitle);
}
开发者ID:wikibus,项目名称:Augean.Console,代码行数:5,代码来源:supported-operation-view.ts
示例7: expectsObserver
@observe('supportedOperation.expects')
expectsObserver(expects:IClass) {
this._setHasExpects(!!expects && expects.id !== nothing);
setTitle.call(this, expects, this._setExpectsTitle);
}
开发者ID:wikibus,项目名称:Augean.Console,代码行数:5,代码来源:supported-operation-view.ts
示例8: getProperties
@observe('supportedClass')
getProperties(supportedClass:IClass) {
this.$.supportedProperties.value = null;
this.$.classTabs.selected = 0;
}
开发者ID:wikibus,项目名称:Augean.Console,代码行数:5,代码来源:supported-class-view.ts
示例9:
@observe('resource')
_onResourceChanged(resource: IHydraResource) {
this._setDisplayedResources([ resource ]);
}
开发者ID:wikibus,项目名称:Augean.Console,代码行数:4,代码来源:default-resource-viewer.ts
注:本文中的twc/polymer.observe函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论