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