23,969 questions
0
votes
0
answers
54
views
emberjs tests not running
My tests are not running anymore, abort with this error:
Error: No tests were run.
at ProcessingQueue.done (webpack://__ember_auto_import__/./node_modules/qunit/qunit/qunit.js?:819:583)
at ...
0
votes
0
answers
39
views
File uploading with 'ember-file-upload'
I intend with this gjs to upload files to my web root but the response is always 404. Tried to follow the documentation, but probably missed something, about access permissions?? The files will ...
0
votes
1
answer
55
views
Using ember-concurrency tasks in ember resources
In our project we have a following class based resource
export class MinuteTimer extends Resource<MinuteTimerArgs> {
@service
declare dateManager: DateManagerService;
@tracked ...
261
votes
9
answers
190k
views
Token Authentication vs. Cookies
What is the difference between token authentication and authentication using cookies?
I am trying to implement the Ember Auth Rails Demo but I do not understand the reasons behind using token ...
396
votes
3
answers
163k
views
SPA best practices for authentication and session management
When building SPA style applications using frameworks like Angular, Ember, React, etc. what do people believe to be some best practices for authentication and session management? I can think of a ...
372
votes
18
answers
72k
views
Separate REST JSON API server and client? [closed]
I'm about to create a bunch of web apps from scratch. (See http://50pop.com/code for overview.) I'd like for them to be able to be accessed from many different clients: front-end websites, smartphone ...
1
vote
1
answer
81
views
Emberjs - component using parent template after upgrading to ember 5.12 from ember 3.16
I recently updated my app from ember 3.16 to ember 5.12 and have started seeing a weird issue.
My component has started using template from the parent component is it extending.
I am using co-located ...
105
votes
16
answers
201k
views
Iframe in Chrome error: Failed to read 'localStorage' from 'Window': Access denied for this document
I have a web app which uses localStorage. Now we want to embed this web app on other (third-party) sites via iframe. We want to provide an iframe embed similar to youtube so that other websites can ...
0
votes
0
answers
38
views
ember - store.pushPayload - does not belong to this store instance
I have recently updated my ember project code from ember 3.16 to ember 5.12 (and ember-data to 5.3.0)
The following piece of code worked fine in ember 3.16 (without even injecting the store service ...
68
votes
13
answers
45k
views
npm install fails in jenkins pipeline in docker
I'm following a tutorial about Jenkins pipeline and I can get a "hello world" working under at node 6.10 docker container.
But, when I added a default EmberJS app (using ember init) to the repo and ...
226
votes
6
answers
140k
views
How to implement not with if statement in Ember Handlebars?
I have a statement like this:
{{#if IsValid}}
I want to know how I can use a negative if statement that would look like that:
{{#if not IsValid}}
0
votes
0
answers
178
views
Could not find module `@ember/test-helpers` imported from `ember-cli-mirage/get-rfc232-test-context`
I am upgrading my ember app from 3.16 to 5.12. I am following step by step approach where I have upgraded most of the packages and handled deprecations successfuly.
But when I update the following ...
2
votes
0
answers
80
views
new ember.js application fails to start as cannot find node_modules/@embroider/macros/src/node.js.js (with double .js)
Just learning Ember.js
Following tutorial at https://guides.emberjs.com/release/tutorial/part-1/orientation/
with
ember new super-rentals --lang en
then once finished installing packages
cd super-...
1
vote
0
answers
20
views
Is there a way to redirect user to different login pages depending on current route prefix if session token is expired?
We use Ember Simple Auth to work with authentication in our Ember application. Currently it's Ember v4.
We have two different user types and two different route prefixes in our application for them to ...
102
votes
10
answers
23k
views
How to architect an Ember.js application [closed]
It's been difficult to keep up with the evolution of Ember JS as its approached (and reached!) version 1.0.0. Tutorials and documentation have come and gone, leading to a lot of confusion about best ...
0
votes
1
answer
34
views
Joi validation of emberjs belongsTo
ember 5.12
Joi 17.13.3
my emberjs model aModel has a field which is defined like this:
@belongsTo('anotherModel', {async:true, inverse:null}) anotherModel;
I want to validate, as part of my Joi ...
0
votes
1
answer
44
views
Proper way to migrate @computed decorators
I have a model Post that used a @computed decorator like this
@hasMany('comment', {async: true}) comments;
@computed('[email protected]')
get authorNames(){
let comments = this.comments;
...
1
vote
2
answers
67
views
LinkTo fails on click
I generate a link as:
<td><LinkTo @route="assets.asset" @model="{{asset.id}}">{{asset.id}}</LinkTo></td>
The link is generated correctly. When I click ...
95
votes
9
answers
64k
views
How can I execute array of promises in sequential order?
I have an array of promises that need to run in sequential order.
var promises = [promise1, promise2, ..., promiseN];
Calling RSVP.all will execute them in parallel:
RSVP.all(promises).then(...);
...
0
votes
0
answers
148
views
Slow Ember build in docker container
I'm attempting to Dockerize my local development setup to make it much simpler to onboard new developers and ensure a common local environment for all. But i am running into build performance issues ...
98
votes
3
answers
30k
views
Ember.js or Backbone.js for Restful backend [closed]
I already know that ember.js is a more heavy weight approach in contrast to backbone.js. I read a lot of articles about both.
I am asking myself, which framework works easier as frontend for a rails ...
76
votes
6
answers
26k
views
EmberJS: How to load multiple models on the same route?
While I am not new to web development, I am quite new to to client-side MVC frameworks. I did some research and decided to give it a go with EmberJS. I went through the TodoMVC guide and it made sense ...
79
votes
8
answers
33k
views
How do I add a separator between elements in an {{#each}} loop except after the last element?
I have a Handlebars template where I'm trying to generate a comma-separated list of items from an array.
In my Handlebars template:
{{#each list}}
{{name}} {{status}},
{{/each}}
I want the , to ...
0
votes
1
answer
33
views
Why accessing a components root element using this.$(#rootElementId) returns zero elements?
DOM
<div id="ember3705" class="ember-view">
<div id='childelement'></div>
</div>
I'm trying to execute this js code this.$('#ember3705') in component.js of ...
80
votes
9
answers
47k
views
Recommended way to include bootstrap library in Ember.JS ember-cli App
I am trying to install properly Twitter Bootstrap in my current ember-cli project.
I did install bootstrap with bower :
bower install --save bootstrap
Now the library is downloded in /vendor/...
0
votes
0
answers
34
views
How to resolve Mirage mocking HasMany relationship error for Ember JS
Ember JS framework.
I am trying to test my route.js . I created route-test.js as below which is running fine but I need to use mirage mocking to mock foo model in route-test.js.
When I tried mocking, ...
0
votes
0
answers
15
views
ember-data - relationships not getting loaded
I’m encountering an issue with Ember Data (version 5.3.0) involving relationships not resolving as expected. My setup:
TPE model has a belongsTo relationship with the network-construct (NC) model:
...
0
votes
0
answers
23
views
ember: computed propertied | ember-macto-helper/computed vs @ember/objects
I am moving away from ember-macro-helpers/computed in my project and starting using computed from '@ember/object'
I have following code
rowData: computed('addEndpointsData', function () {
const ...
40
votes
10
answers
21k
views
Assigning 'active' class to selected list item in EmberJS
I have a list and I'd like to set one item as class="active" automatically. Given the following bootstrap code:
<ul class="nav">
<li {{bindAttr class="atIndex:active"}}>{{#linkTo "index"}...
0
votes
1
answer
781
views
How to Resolve 'Uncaught TypeError: Cannot read property 'charAt' of undefined' Error in Vendor.js When Focusing First Error Field on Form Submission?
I'm currently grappling with an issue regarding the focusing of the first error field within a form upon submission. Despite successfully implementing functionality to focus on the first error field ...
51
votes
15
answers
25k
views
emberjs - how to mark active menu item using router infrastructure
I'm trying to create navigation tabs (taken from Twitter Bootstrap):
<ul class="nav nav-tabs">
<li class="active"><a href="#">Home</a></li>
<li><a href="...
97
votes
1
answer
14k
views
What is Ember RunLoop and how does it work?
I am trying to understand how Ember RunLoop works and what makes it tick. I have looked at the documentation, but still have many questions about it. I am interested in understanding better how ...
50
votes
5
answers
36k
views
Accessing Index in #each in emberjs
Please check out the code attached:
http://jsbin.com/atuBaXE/2/
I am trying to access the index using {{@index}} but it seems not to be compiling. I think handlebars supports that:
{{#each item in ...
0
votes
2
answers
73
views
Background Video Not Autoplaying
Not sure if this is an issue with the local server ember generates, or if it is just a normal thing local servers do, but currently I have a video that I play in the background of my page that does ...
0
votes
1
answer
37
views
How to bootstrap Angular application from Ember js
I want to bootstrap angular webapp from ember js and for that, we have imported angular bundle files into index html of ember js and trying to bootstrap angular by <app-root> </app-root> ...
1
vote
1
answer
142
views
Missing Resource Type: received resource data with a type 'events' but no schema could be found with that name
I have a basic Rails 7 application that uses the jsonapi-resources gem. On the Rails side of the application, I implemented a simple structure of two resources - events and event_categories. They are ...
1
vote
1
answer
39
views
In qunit, how to query the scrollbar height or detect if a scroll bar is present on an element?
I'm writing tests for my Ember components. One of the more delicate issues is getting a specific element to scroll while not generating scroll bars elsewhere.
I'm trying to write a test that will tell ...
0
votes
1
answer
71
views
How to migrate Ember web application to Angular module by module
We have one web application developed in Ember js and we want to migrate it to latest Angular, but we want to migrate it module by module. so we need to coexist Angular and Ember both. and build ...
0
votes
0
answers
31
views
Pollyjs delay request using timing: Timing.fixed(200) is not working in ember test environment
Pollyjs delay request using timing: Timing.fixed(200) is not working in ember test environment, but in development mode it delays request by 200ms
0
votes
1
answer
124
views
Configure xunit output of Testem in Ember.js
I use Ember 5.6.0. Running ember test --silent --reporter xunit > ember-test-result.xml outputs an XML with the following content:
<testsuite name="Testem Tests" tests="439" ...
86
votes
8
answers
31k
views
How to use multiple models with a single route in EmberJS / Ember Data?
From reading the docs, it looks like you have to (or should) assign a model to a route like so:
App.PostRoute = Ember.Route.extend({
model: function() {
return App.Post.find();
}
});
...
0
votes
1
answer
64
views
Multi-tab state persistence in webapp
Having done this for awhile, I’d love a quick sanity check: in a web app using the History Web API is there any way to replicate state persistence across multiple primary nav tabs like you might ...
0
votes
1
answer
53
views
Render only child template in ember js
I have an Ember.js application, and I have a route called parent/child. When I render the parent/child template, I only want the content inside the parent/child template to be displayed. I don't want ...
3
votes
0
answers
166
views
Gridstack does not adhere to dynamic drag handles
I'm currently using Gridstack in an Ember project and want to have a custom drag handle. I know this can be implemented by setting the draggable: { handle: '.my-custom-drag-handle' } in the options. ...
1
vote
1
answer
334
views
Ember 4.x (Octane) - replacement for Observers?
I am nearly done upgrading a very old Ember.js project from 2.13 all the way up to the latest LTS release, 4.12. Along the way I've been coming to grips with the changes that the Octane release ...
18
votes
11
answers
45k
views
Get current route name in Ember
I need to get the current route name in my ember application; I tried this:
Ember App.Router.router.currentState undefined
but it doesn't work for me (there is probablig something i'm missimg...) I ...
0
votes
0
answers
39
views
Updating a Single Attribute in Ember-Data Model Also Resets Relationships
I'm working on an Ember.js application where I need to update a single attribute (views) on a book model using Ember Data. However, when I call save() on the model, the relationships of the book (like ...
0
votes
2
answers
117
views
How to dynamically add click handler to Ember Octane component - dynamic "on" modifier
I have a situation where I need to make a component and it has some logic to either render as a button or as a DIV depending on if it has a link.
{{#let
(if
this.hasLink
(component "...
0
votes
1
answer
89
views
packageRules definition for embroider to allow component from @glimmer/component to work in ember 5.8
Just upgraded from 5.4 to 5.8. Now I'm getting this error.
\src\node_modules\.embroider\rewritten-app\routes\components\case-tools\template.hbs:
Unsafe dynamic component: this.tool in
node_modules\....
0
votes
2
answers
61
views
Local npm dependency in Ember.js 5.8
I need custom linting rules for my Ember 5.8 project. Ember 5.8 uses ESLint 8.57 and ESLint allows custom rules via Plugin, see this tutorial. Step 8 of said tutorial reads as follows:
You might want ...