ember-cli

Ember App not playing sound in Chrome

送分小仙女□ 提交于 2019-12-24 15:21:39
问题 I have built an ember music app consuming favorite songs by SoundCloud using the api of this project. You can see the demo here From a couple of days i have noticed that only in Chrome any song i play, the sound and and the stream do not work, in the other browsers ( Safari and Firefox) it works well as usual. I thought at the beginning it was violating the content Security Policy directive in environment Ember Cli. See the question here but although i have solved it, the problem is still

Dynamically setting select key in Ember within select field

浪尽此生 提交于 2019-12-24 14:00:24
问题 So I have an API that generates forms from a database. The API for the fields returns: { "formFields": [ { "module": 1, "fieldName": "Global Title", "fieldPosition": "1", "fieldType": "select", "fieldEditable": true, "dataTable": "message", "dataKey": "calling_gt", "dataValue": "id", "id": 1, "createdAt": "2015-10-15T13:59:30.764Z", "updatedAt": "2015-10-15T13:59:30.764Z" } ] } I have multiple Ember components. Essentially an Add Parameter component that loops through the fields related to

Ember integration testing hangs after visiting route

◇◆丶佛笑我妖孽 提交于 2019-12-24 13:32:56
问题 I am trying to do a simple integration test and I started from the integration example on the ember-cli website. Right now when I test in a browser (localhost:4200/tests), the follow case routes to where I expect, but then it just hangs and never does success or failure. import Ember from "ember"; import { test } from 'ember-qunit'; import startApp from '../helpers/start-app'; var App; module('Integration - Create Event', { setup: function() { App = startApp(); }, teardown: function() { Ember

How do I install bootstrap 4 template to Ember web project?

北城余情 提交于 2019-12-24 08:59:20
问题 This is a continuation of another post I have posted: click here I have downloaded the INSPINIA admin theme, which is based off twitter bootstrap. It contains pre-created projects for most web-ui frameworks, except Ember. Steps taken so far: Installed ember-boostrap Installed SASS pre-processor Copied the *.scss files into the app\styles folder The app.scss file looks as follows: app\styles\app.scss @import "ember-bootstrap/bootstrap"; @import "style"; The Ember-Cli-Build.js file is as

Place to put assets for dev/test in emberjs

霸气de小男生 提交于 2019-12-24 08:25:42
问题 I'm using mirage to mock some data and I'd like to mock an <img> with the appropriate file. The problem is that I will have to place the image in /public/assets and the images placed there will be deployed later on as well. Is there a way to avoid this? I couldn't find a recommendation in the ember cli website (https://ember-cli.com/user-guide/#asset-compilation) I found one addon that could do this (ember-test-assets), but I'd like to avoid installing extra addons as much as possible. Thanks

After update ember-cli 2.11.0 version how to npm instead of bower?

点点圈 提交于 2019-12-24 08:09:06
问题 When I updated ember-cli to 2.11.0 and I found EMBER NO LONGER SUPPLIED VIA bower . So I check npm instead of bower, but I don't know what to do. Such as moment.js use bower look like: bower.json "dependencies": { ... "moment": "2.14.1" } ember-cli-build.js ... app.import('bower_components/moment/moment.js'); ... .jshintrc ... "moment": true, ... This way can run in help and controller . But I use npm and set ember-cli-build.js code app.import('node_modules/moment/moment.js'); had errors. And

What is the best practice to implement custom Javascript code and where should I start working with Ember first?

拜拜、爱过 提交于 2019-12-24 08:05:28
问题 I'm using Ember 2.7.0 of course with ember-cli. I come from Rails, I used to put in "assets/application.js" all my javascript like, for example: var ready = function () { myFunction('test'); $('#btn-fluid').on('click', function () { $('#myPage').toggleClass('container') }); } document.addEventListener("turbolinks:load", function () { ready() }) Now with Ember where I have to put this code in my application? I read on the web the use of: Ember.Application.create({ ready: function () { }); but

How should I get the value of this input field?

泪湿孤枕 提交于 2019-12-24 04:05:26
问题 I am using a subexpression at {{input value=(cents-to-dollars model.amountInCents)}} . It is using a custom helper to convert the value from cents to dollars. My API returns cents. However in the controllers save action, console.log(this.get('model.amountInCents')); returns undefined . Am I missing something? Maybe name or valueBinding in the input helper? If I remove the subexpression. console.log(this.get('model.amountInCents')); outputs fine. // Routes import Ember from 'ember'; export

How should I get the value of this input field?

China☆狼群 提交于 2019-12-24 04:04:06
问题 I am using a subexpression at {{input value=(cents-to-dollars model.amountInCents)}} . It is using a custom helper to convert the value from cents to dollars. My API returns cents. However in the controllers save action, console.log(this.get('model.amountInCents')); returns undefined . Am I missing something? Maybe name or valueBinding in the input helper? If I remove the subexpression. console.log(this.get('model.amountInCents')); outputs fine. // Routes import Ember from 'ember'; export

Could not find module ember-validations

我的未来我决定 提交于 2019-12-24 02:23:57
问题 Trying to use ember-validations plugin for ember-cli. Bumped with this issue that I can't figure what is missing. Here is the dependencies part in my package.json: "devDependencies": { "broccoli-asset-rev": "^2.0.0", "broccoli-ember-hbs-template-compiler": "^1.6.1", "ember-cli": "0.1.9", "ember-cli-6to5": "0.2.1", "ember-cli-content-security-policy": "0.3.0", "ember-cli-dependency-checker": "0.0.7", "ember-cli-ic-ajax": "0.1.1", "ember-cli-inject-live-reload": "^1.3.0", "ember-cli-qunit": "0