ember.js

    1熱度

    1回答

    我目前正在爲使用EmberJS編寫的應用程序編寫測試。我正在使用Mirage。 我有兩個以下型號: 海市蜃樓/模型/ paperwork.js export default Model.extend({ customer: belongsTo('customer'), paperwork_products: hasMany('paperwork-product', { inverse: 'pa

    4熱度

    1回答

    首先,我不是一個經驗豐富的JS開發者,所以請原諒我可能犯的明顯錯誤。 我想實現一個自定義身份驗證器,用於使用OAuth2密碼授權對Keycloak進行身份驗證,該授權要求client_id作爲請求主體的一部分進行傳遞。 import OAuth2PasswordGrant from 'ember-simple-auth/authenticators/oauth2-password-grant';

    0熱度

    1回答

    我想從一個燼模型訪問一個嵌套的對象。 這些模型是這樣的: 內容: export default DS.Model.extend({ title: DS.attr('string'), text: DS.attr('string'), createdBy: DS.attr('string'), status: DS.attr('string'), c

    0熱度

    1回答

    我想添加一個預加載頁面,我的慢模式頁。但是我的路由器沒有顯示預載的模板。 這裏是我的路線結構: http://localhost:4302/cs2i/purchase/purchaseDetails this.route('cs2i', function() { this.route('purchase', function() { this.route('purchase

    0熱度

    1回答

    所以我想設置海市蜃樓使用騙子,我已經做到了,但我收到以下錯誤: assert.js:35 Mirage: The route handler for /services/1 is trying to access the :serviceId model, but that model doesn't exist. Create it using 'ember g mirage-model :se

    0熱度

    1回答

    好的,我對Ember(和框架)很新穎,所以如果我遺漏了一些明顯的東西,請原諒我。 我有一個包含一些邏輯的設置菜單組件。該邏輯的一部分是一個返回對象數組(可能的設置)的計算屬性。它將該數據傳遞給視圖組件。 菜單component.js possibleSettings: computed(function() { // Example of returned data retur

    0熱度

    1回答

    我在我的餘燼應用中有一個表單,這個表單有一個行爲路由。我想抓住我的電子郵件和密碼值,並與他們做一些事情。 但是,我不能使用this.get('email')獲取值;我認爲這會起作用。我如何獲得價值觀並將其用於我的行動?目前它只是將它們設置爲空的。 這是我的模板。 <div class='page-header'> <h1>Login</h1> </div> {{input

    0熱度

    1回答

    所以我想在ember中使用ember數據構建下面的select下拉列表,並且API將使用JSON API規範。下面是一個截圖例子 所以我會在服務模式,狀態下面 應用程序/模型/ service.js category: DS.belongsTo('category'), subCategory: DS.belongsTo('sub-category') 應用程序/模型/ category.j

    0熱度

    2回答

    我安裝了ember-cli-daterangepicker。我做了錯誤服務器,這工作很好,但我現在得到錯誤。我安裝任何東西。 我ember server並把它 File: ember-cli-daterangepicker/components/date-range-picker.js The Broccoli Plugin: [broccoli-persistent-filter:Babel]

    0熱度

    1回答

    我想設置一種方式來動態地定義路由,他們的模板和模型。 (恩伯2.16.0) 到目前爲止,我有這樣的: // app/router.js Router.map(function() { let routes = [ {route: "page_one", templateName: "default.hbs"}, {route: "page_two", temp