aurelia-binding

    3熱度

    1回答

    我有一個計算屬性,它是依賴於A和B: : @computedFrom(A, B) get property() { } 該場所被在具有repeat.for(總共5種元素)元件中使用 <element repeat.for 1 to 5 elementProperty=$"{property}"> </element> 當值A發生變化時,我希望property()被稱爲一次,並

    0熱度

    2回答

    我試圖在Aurelia中構建自定義元素。在這一點上,這是我有: item.html <template> <span>${someProperty}</span> </template> item.ts import {bindable} from 'aurelia-framework'; class Item { @bindable someProperty: str

    1熱度

    1回答

    我是Aurelia Js的新手,在這裏,我正在使用一個簡單的選擇框,但它在更改值時不工作。 HTML: <select value.bind="selectVal" change.delegate="changed()"> <option value="" disabled selected>Doc.Type</option> <option value="

    2熱度

    2回答

    我正在按照結構實現工具提示Sean Hunter Blog。現在我想提供工具提示內容作爲動態html內容,即我想在內容中顯示一個html模式。我如何提供使用Aurelia框架。在使用自定義綁定處理程序的基因敲除JS中,我提供了與下面的代碼一樣的分區標識的內容。 淘汰賽結構 <button data-bind="tooltip: { template: 'ElementId', trigger: '

    5熱度

    1回答

    選擇的選項值我一張有以下屬性dropdown: <select value.bind="row.columns[$parent.$index].colSize" change.delegate="changeColumnSize($parent.$index, $index, row.columns[$parent.$index].colSize)"> <option value="1"

    0熱度

    1回答

    我需要在Aurelia Js上傳文件。我不知道如何發送文件到服務器(命中給定的API)。我有兩個疑問,一個是我的'內容類型',另一個是,我是否需要將我的圖像對象更改爲任何其他格式。這裏是我使用的代碼, scanupload.html: <input type="file" files.bind="selectedFiles" change.delegate="onSelectFile($event

    1熱度

    1回答

    我的Aurelia應用程序中有一個父 - 子組件體系結構。 Panel是一個父組件視圖模型,其中有一個Tool組件。 我在Panel上有一個分頁界面,點擊Tool應該更新。問題是,跟蹤哪個頁碼被點擊的變量,pageNumber僅在panel.ts中可用,在tool.ts中不可用。所以基本上,這是兩個ViewModel之間通信的問題。 要解決此問題,我正在使用Aurelia的EventAggrega

    1熱度

    1回答

    考慮以下列表: fields.html <div repeat.for="f of fields"> ${f.name}: <input value.bind="f.value"> </div> fields.js class Fields { fields = [{ name: "First name", value: "Jack"

    0熱度

    1回答

    Aurelia路上可綁定屬性是有描述一個模板元素 <template bindable="router"> 我沒有發現任何aurelia.io的綁定屬性的文件。

    3熱度

    1回答

    如果我有一個這樣的自定義元素: export class mycomponent { constructor() { this.name = 'John Doe'; } } <template> My component <slot></slot> </template> 並使用另一個視圖內該組分(I註冊全局自定義元素): <temp