ember-cli

“[Report Only] Refused to load the font…” error message on console

时间秒杀一切 提交于 2019-12-03 04:50:05
More specifically: [Report Only] Refused to load the font 'data:application/x-font-woff;charset=utf-8;base64,d09GRgABAAAAABBQAAoAAAAAG…H8zVsjnmMx0GcZ2HGViNOySWEa9fvEQtW43Nm+EOO0ZIpdLbMXoVzPJkcfHT6U+gLEpz/MAAAA' because it violates the following Content Security Policy directive: "font-src 'self'". this is my contentSecurityPolicy object at environment.js : contentSecurityPolicy: { 'default-src': "'none'", 'script-src': "'self' 'unsafe-inline' 'unsafe-eval' connect.facebook.net", 'connect-src': "'self'", 'img-src': "'self' www.facebook.com", 'style-src': "'self' 'unsafe-inline'", 'frame-src':

How do you serve ember-cli from https://localhost:4200 in development

邮差的信 提交于 2019-12-03 03:05:23
For our authentication to work with our ember app we need to serve the app from a secure url. We have a self signed ssl cert. How do I setup the ember-cli to serve the index.html form a https domain. Cheers munsellj Also see https://stackoverflow.com/a/30574934/1392763 . If you will always use SSL you can set "ssl": true in the .ember-cli file for your project which will result in the ember serve command using SSL by default without having to pass the command line flag every time. By default ember-cli will look in an ssl folder in the root of your project for server.key and server.crt files

Ember CLI Live Reload Not Working

余生长醉 提交于 2019-12-03 02:59:00
I've seen other similar questions here and here but neither of those worked for me. I'm on a mac and simply installed ember cli using npm and I thought it would work out of the box. Here is the server output: version: 0.1.4 Could not find watchman, falling back to NodeWatcher for file system events Livereload server on port 35729 Serving on http://0.0.0.0:4200/ Build successful - 2456ms. Slowest Trees | Total -------------------------------+---------------- EsnextFilter | 877ms TreeMerger | 380ms Concat | 375ms JSHint - Tests | 178ms EsnextFilter | 146ms ES6Concatenator | 135ms I wasn't the

Why is my ember-cli build time so slow on windows?

倖福魔咒の 提交于 2019-12-03 01:23:02
Ember-cli is building very slowly with ember server on windows. Build successful - 13126ms. Slowest Trees | Total -------------------------------+---------------- TreeMerger (vendor) | 3154ms TreeMerger (stylesAndVendor) | 2051ms TreeMerger (appAndDependencies) | 1914ms StaticCompiler | 1791ms This is in contrast to the same project building in less that 1 second on a linux box. Vinoth Kumar Official recommendation from ember-cli to improve its performance on windows Install ember-cli-windows with node using the below command npm install -g ember-cli-windows Run the following command on your

Uncaught Error: Assertion Failed: calling set on destroyed object

霸气de小男生 提交于 2019-12-03 00:59:30
working in ember-cli testing. After all tests passed it returns extra two test with errors. Uncaught Error: Assertion Failed: calling set on destroyed object Source : '../dist/assets/vendor.js:13269' this is one unit test configuration import Ember from "ember"; import { test,moduleFor } from 'ember-qunit'; import startApp from '../helpers/start-app'; var App; module('An Integration test',{ setup:function(){ App=startApp(); }, teardown: function() { Ember.run(App, 'destroy'); } }); Huafu This is either because in the result of a promise or any other deferred code you do not check the destroy

#ember-power-select: changing the value in one power-select box , it alternately changes the same value for another power-select box

半城伤御伤魂 提交于 2019-12-02 20:32:53
问题 I used custom-search-action in #ember-power-select, changing the value in one power-select box , it alternately changes the value(sets the same value as selected in 1st select box)for another power-select box too. Below is the handlebar code: {{#each model.hpqualifications as |hpqualification|}} {{#power-select selected=hpqualification.hoprofile search=(action "hoProfile") onchange=(action (mut hpqualification.hoprofile.name) value="name") as |repo| }} {{repo.name}} {{/power-select}} {{/each}

Emberjs : Configure router to handle direct 'GET' requests

北慕城南 提交于 2019-12-02 19:27:25
问题 How to configure router to handle xhr and direct requests to api. Use Case : File Download I have a RESTAPI from which i am trying to download a file using an <a> action link tag -> clicking on which resolves to a new Tab/Window with absolute url. My webApp is serving at http://localhost:4200 proxying request to http://localhost:44226 When i try to hit the api to download the file using the url http://localhost:4200/api/download/files/1 I Get the error : UnrecognizedURLError: /api/download

Accessing Ember-CLI Nested Controllers

丶灬走出姿态 提交于 2019-12-02 19:11:30
问题 This is my directory structure: controllers/ ---- restaurant/ ----items.js ---- index.js ---- restaurant.js And my router declaration: this.route("restaurants",{ path: "/restaurants" }); this.resource("restaurant", { path: "/restaurants/:restaurant_id" }, function() { this.resource("items", { path: "/items" }); }); My Items controller (located in restaurants/items.js) begins with the following: export default Ember.ObjectController.extend({ needs: ["restaurant"], restaurant: Ember.computed

How to debug ember-cli tests running in phantomjs

浪子不回头ぞ 提交于 2019-12-02 19:03:08
Context: I have an acceptance test for my ember-cli application, and the test passes just fine in Chrome. However, in phantomjs, my test fails -- the UI doesn't get created the same way, and I'm trying to work out why. (I think the test is broken because of https://github.com/ember-cli/ember-cli/issues/1763 , but the general question of how to debug remains) In Chrome, I can use the standard debugging tools on my tests and all is well -- but in phantomjs, I can't get at it with a debugger. I also don't see console.log() messages show up in the output -- all I get is a list of test results in

How to mock an Ember-CLI service in an acceptance test?

天涯浪子 提交于 2019-12-02 17:30:06
Quick summary/tldr: It seems that Ember's container lookup process + Ember-CLI's module resolver doesn't allow manually un-registering a service and then registering a replacement if the original service can be resolved using the resolver (I want to do the method described here , but it doesn't work) How can I mock an Ember-CLI service in an acceptance test without using a hacky, custom resolver? ( example project/acceptance test here ) Detailed explanation + example Create a new service that is injected into a controller: ember generate service logger services/logger.js export default Ember