Stack Overflow » Ember.js
1 FOLLOWERS
Start collaborating and sharing organizational knowledge on Ember.JS in this forum. Learn to implement CSRF with Ember Ajax or with Ember Data, gain solutions for the failure of some packages, and come across techniques for updating Ember. Stack Overflow empowers the world to develop technology through collective knowledge.
Stack Overflow » Ember.js
3d ago
I don't understand why fillIn can't find 'data-test-code-nav-selector'.
I have paused the test and using the devtools I copied this DOM excerpt. It displays as expected. As you can see, the select tag has the expected attribute.
<select label="codingDropdown" data-test-code-nav-selector="">
<option value="PDF_I10_PCS_APPENDICES">ICD-10 PCS Appendices</option>
<option value="PDF_I10_PCS_REFERENCE_MANUAL">ICD-10-PCS Reference Manual</option>
</select>
Then, in the test.js file, I'm calling fillIn with the same attribute.
await this.pauseTest();
fil ..read more
Stack Overflow » Ember.js
1w ago
I'm new to ember js, It may feel like a dumb question, but still: I've already defined a component say {{pq-component}}, it works fine, when called from a .hbs file. But when I try to call it from a .js file like this
$('#'+block_id+"_toppager").find('.div-import-box').html('<div>{{pq-component}}</div>');
The {{pq-component}} is displaying as a 'String', rather than the rendering the contents of the actual component itself.
So, any suggestions to render the content of {{pq-component}} from the controller file, would be helpful.
I'm using "ember 2.1"
When I try to call it from a ..read more
Stack Overflow » Ember.js
2w ago
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 "external-library-button$special-button")
(element "div")
)
as |MaybeAButton|
}}
<MaybeAButton
{{on "click" this.onClick}} // can this be dynamically added?
>
...lots of nested code
</MaybeAButton>
{{/let}}
I tried to do add it dynamically but I get an error that "on" is not in scope.
{{(if this.hasLink (modifier on "click" this.onClick))}}
What's a good way ..read more
Stack Overflow » Ember.js
2w ago
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. But, it appears as if the drag handle is rendered after the rest of the component in Ember and so Gridstack defaults to the entire grid-stack-item class.
I tried replicating it in native JS and was able to using setTimeout. Is there any way to reconfigure gridstack to use the newly added handles? See demo here: https://jsfiddle.net/vishaalagartha/gvt4390e/9 ..read more
Stack Overflow » Ember.js
2w ago
I have an Ember.js SPA that's calling a .net service via AXIOS. Everything was working until I started checking the SessionId header to return a 401 when it's expired.
As long as the token is valid, my middle ware picks up the session ID and the call continues and everything is fine.
The problem is this, when the session id has expired, my C#/.net middle ware returns a 401. But AXIOS doesn't fill in the error.response.status: response is undefined.
What I want is for my AXIOS interceptor to have an error.response.status set to 401 so I can redirect the user to the sign-in route. My understandi ..read more
Stack Overflow » Ember.js
1M ago
Context: I have a table of inputs and outputs for a person and with these values I calculate the total hours worked and check whether the total time requirement has been met. Example: Monday = 8 hours
I need to create query param to update this table with the value of the input type="month" that comes from handlebars.
At the moment I don't have query param , I tried doing it in the controller and getting obtain the value, but, i dont know return this response from the handlebars and render the attributes
@action
month(event) {
const filteredEntries = this.model.calculatedEntrie ..read more
Stack Overflow » Ember.js
1M ago
I have an ember web application, with a simplified structure of landing page like this:
<container>
<header></header>
<main> {{outlet}} </main>
<footer></footer>
</container>
I'm facing an accessibility issue.
On my main page when I navigate between clickable elements with the "tab" key, clickable items projected in outlet are not accessible.
Also, when I manually change my focus to the desired area ('main'), its content is available for being "tabbed" on.
I have tried adding tabindex="0" on main, but it does not wor ..read more
Stack Overflow » Ember.js
1M ago
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 within a form upon submission, I'm encountering challenges post-implementation. Here's a detailed overview:
Environment Setup: Ember 3.14 running on Node 10.8.0 with Mirage for server API mocking.
Objective: The primary aim is to ensure that upon form submission, the initial error field is focused on for user attention.
Approach Employed: To achieve this functionality, I successfully implemented co ..read more
Stack Overflow » Ember.js
1M ago
I created services/store.js with default export, then I added "@service store;" in route. Right at that line the following error occurs:
TypeError: Cannot read properties of undefined (reading 'default')
at Module.default (webpack://tkl/./services/store.js?:3:107)
at Resolver._extractDefaultExport (webpack://tkl/../rewritten-packages/ember-resolver.4afe6404/node_modules/ember-resolver/index.js?:389:25)
at Resolver.resolveOther (webpack://tkl/../rewritten-packages/ember-resolver.4afe6404/node_modules/ember-resolver/index.js?:150:32)
at Resolver.resolve (webpack://tkl/../rewritt ..read more
Stack Overflow » Ember.js
1M ago
I have 3 web apps written in ember.js /appA, /appB and /AppC in the same domain and they connect to the same api with a token.
I have this configuration:
// under app/session-stores/application.js
import AdaptiveStore from 'ember-simple-auth/session-stores/adaptive';
export default class ApplicationSessionStore extends AdaptiveStore {
cookieName = 'appX'; // where X is {A, B or C}, in every app respectively
localStorageKey = 'appX';
}
// Without this file a user can log in whatever app and share his token to the others apps.
Whit this setting every user have to login for each app.
How ..read more