htmlbars

    2熱度

    2回答

    我們正在將我們的應用程序的應用程序從1.10更新到1.11,我們遇到了一個問題。我們有一個簡單的排序切換助手,不再工作。 {{#link-to "foo" (sort-toggle "id")}} 代碼的幫手: Ember.HTMLBars._registerHelper('sort-toggle', function(params, hash, options, env) { va

    0熱度

    1回答

    我嘗試了幾個版本/嘗試創建並返回RSVP.Promise作爲模板的參數。 所有的console.log都給出合理的值,所以承諾分辨率爲。 問題我有(這也是問題)是如何將解析值返回給我的模板。 這裏是我試過的版本:我測試如同我所有的測試,以便 // in controller.js testA: Ember.computed('sessionAccount.account.id', functio

    1熱度

    1回答

    當點擊「編輯」觸發動作「編輯」: {{#link-to "pages.show" page class="list-group-item"}} {{page.name}} <span class="badge" {{action "edit" page preventDefault=false}}>edit</span> {{/link-to}} 然後的動作被觸發

    1熱度

    1回答

    我有一個引導按鈕組在我的灰燼2.2的應用程序看起來像這樣添加一個類: <div class='btn-group' role='group' aria-label='...'> <button type="button" class="btn btn-primary btn-xsm active={{aIsActive}}" >A</button> <button type="

    0熱度

    1回答

    假設下面的模型: export default Ember.Route.extend({ model() { return ['car', 'truck', 'boat']; } }); 我可以循環通過模型像這樣: {{#each model as |vehicle index|}} {{vehicle}} - #{{index}} {{/each}

    0熱度

    1回答

    問題: 我有一個鏈接到每個表中的表。我希望每行的第一個單元格都有一個用於切換的複選框。我可以顯示覆選框,但我無法讓它檢查它。 <table class="table table-hover"> <thead> <th></th> <th>Things</th> <th>Stuff</th> <th></th> </thead> <tbo

    0熱度

    2回答

    我在訪問組件內的輸入值時遇到問題。我試圖在我的模板中動態創建值綁定,並使用this.controller.get(「pst」+ id)訪問conponent.js文件,但結果不明確。使用Ember 2.2 {{#each post in |pst idx|}} {{input value=(concat 'pst' idx)}} {{/each}}

    3熱度

    2回答

    我想顯示一條錯誤消息,當服務器響應與記錄未找到。 在路由處理模型: model: function(userLoginToken) { var userLoginToken= this.store.createRecord('userLoginToken'); return userLoginToken; }, 行動: actions: { sendOTP:

    1熱度

    1回答

    怎麼寫嵌套如果conditition在灰燼htmlBars <div {{bind-attr class=":class1 flag1:'acitve': flag2::'disabled'"}}> 下面 是燼verison DEBUG: Ember : 1.13.0 Ember Data : 1.13.7 jQuery : 1.11.1

    1熱度

    3回答

    未定義在我們的應用中通過調用Ember.HTMLBars.compile有車把模板使用模板編譯器在運行時。示例代碼: let myTemplate = `{{foo}}`; application.register(`template:my-template`, Ember.HTMLBars.compile(myTemplate)); 我試圖從升級灰燼2.6至2.7灰燼,但我得到了開發者控制