ember.js - C3 chart width changes on show/hide

I am working on an ember project and using C3 charts in that for data visualisation . On one page I have a requirement to put 2 charts and need to do show/hide on button click(toggle effect). But on toggling the second chart(initially hidden) , the width of chart gets changed(increased ) , but first chart(initially shown) stays as expected.One more thing that I noticed , is that if I open the console to debug , that second chart comes back to its original width. It's very strange , not able to understand this behaviour . If someone have any ide...Read more

ember.js - Ember setupController not called on transitionTo for dynamic segment

How to get the setupController to run when transition into to a dynamic segment?The model updates but the values initialized in the setupController are not updated because the setupController is not called.Here is a ember-twiddle example of the setupController not being called. help would be greatly appreciate....Read more

ember.js - Preloading video content in EmberJS

I'm building an EmberJS app that is effectively a slideshow and the slides are either images or videos.I've found that, as each slide is loaded, there is a short delay whilst the image or video was loaded from the server. In order to stop this delay, I've added a function to my application controller that extracts a list of the image urls from my models and then calls images.forEach(i => { (new Image()).src = i }); on them. This has resulted in the slide rendering almost instantly, as the images are now loaded from the cache.I was wondering ...Read more

ember.js - ember-simple-auth Password Update and Reset

I'm using ember-simple-auth and the Devise adapter for my Ember.js app. I need to create a way for users to do the following:Update their password (with new password and confirmation fields)Recover/reset their passwordIs there a way to do this with ember-simple-auth or a recommended approach to doing this? My initial thought was to build this into my Ember app, but is this something I should build outside of the Ember app?...Read more

Ember.js returning to computed property within a callback

I have a computed property that checks if a user has already liked a post: likeable: Ember.computed(function () { const currentUser = this.get(''); const post = this.get(''); // Get likes and filter by post and current user this.get('store').query('like', { filter: { user_id: currentUser, post_id: post } }).then(function(like) { // Check if any likes were returned if (like.get('length') != 0) { console.log('length is not 0') return false } else if...Read more

ember.js - @each not updating computed sum value

In a route with an array model, I need a couple of summary statistics available. These summary statistics need to be updated based on values typed into numeric input fields. I have attempted to implement this by setting these as computed properties using @each in a controller.The properties (creditTotal and costTotal) compute on load, but fail to update when values are updated through the input fields. Unfortunately, they need to be updating, and I am at a loss how to make this happen. Admittedly I am not a full time developer, so I am grateful...Read more

ember.js - Routing error with ember-data 2.0 and emberjs 2.0.1

Cross-posting from discuss.ember. I am using Ember 2.0.1 with Ember-data 2.0 and default the default RESTSerializer generated by ember-cli. I know this question has been asked to many places before (which none have real answers) but no solutions have been working for me yet. I have this model hook for a user model : export default Ember.Route.extend({ model() { return'user'); }});Router is the following { this.route('users', { path: '/' }, function() { this.route('user', { path: '/:user_id...Read more

ember.js - How to store and load models from Ember data to and from local files?

I'm giving it a go at making an Ember Electron app and wanting to save some model data to a json or json-api formatted file instead of pushing it to a remote API, what would be the best way to do this?I see that it is possible to call .toJSON() on model objects to get a basic JSON representation of the model, from which I can save it to disk using electron-settings, however I'm at a loss on how to load the data in.From what I can see, using the "push" function in Ember data allows you to import data, however it seems it expects JSON-API format ...Read more

ember.js - Accessing data from recordArray in Ember

Let us say i have a model X idOfX: DS.attr() shouldBeIncluded: DS.attr(), type: DS.attr(), valueOfX: DS.attr(And I'm trying to fetch all elements of type x using findAll/peekAll methods of ember store.After the store method resolves with data, I want to be able to filter data on type attribute or do some operations using valueOfX attribute.What is the best way to access these values.Note: Previously I was accessing record attribute of internalModel object in recordArray. But with ember data 2.11.x record attribute is null until i explicitl...Read more

ember.js - Deploying EmberJS to AWS using SSH + RSync

I've managed to deploy a simple todo app unto AWS with S3 using this site, when I attempt to do this ( Deploying with SSH and Rsync ) according to the tutorial, I run into the following error:gzipping **/*.{js,css,json,ico,map,xml,txt,svg,eot,ttf,woff,woff2}ignoring null✔ assets/ember-user-app-d41d8cd98f00b204e9800998ecf8427e.css✔ assets/vendor-d41d8cd98f00b204e9800998ecf8427e.css✔ assets/ember-user-app-45a9825ab0116a8007bb48645b09f060.js✔ crossdomain.xml✔ robots...Read more

ember.js - Handlerbars on escaping input?

I am testing some frontend code, and I can see the code that takes input using the {{}} handlerbars, so if I entered an input = &123 , shouldn't this be converted to &amp123 and then stored in the server since two double mustache means the characters like '&' is escaped. When I look at the post being send to the server, it still appears as &123....Read more

ember.js - Qunit assert throws not working

I am trying to assert that a few steps in the code (visiting page, providing wrong card-number, password combination and clicking submit)should generate an error from the backend service - I have referred to this already..and tried the suggestion of using Error Object as the second argument to assert.throws but that doesn't work for me. i did see this link as well before posting my question,My problem is - I don't have control over the code that throws the exception/error in this case. (I cannot change it to say Ember.assert etc) I just want to...Read more

ember.js - "Missing translation" when running an Ember acceptance test related to ember-i18n package

I'm writing acceptance tests for an Ember component which allows the user to toggle their i18n settings via a dropdown provided by the ember-select-list package. I'm also using the ember-i18n package for the i18n settings. The dropdown component looks like this:import Ember from 'ember';export default Ember.Component.extend({ i18n: Ember.inject.service(), languagePreference: Ember.inject.service(), classNames: ['language-dropdown'], languageOptions: Ember.computed('i18n.locale', function() { let i18n = this.get('i18n'); return i18n....Read more