當前位置: 首頁>>代碼示例>>TypeScript>>正文


TypeScript polymer.observe函數代碼示例

本文整理匯總了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;未經允許,請勿轉載。