Questions tagged [ember-octane]
61 questions
2
votes
1 answer
Getting error after migrating to Ember octane
I am using Ember 3.16.3 and i am getting this error on the following code :
Error: Assertion Failed: You must pass a function as the second
argument to the on modifier
//login.hbs
2
votes
2 answers
Ember Octane: Unit testing async action on controller
Having the following controller and tests:
app/controllers/application.js
import Controller from '@ember/controller';
import { action } from '@ember/object';
export default class ApplicationController extends Controller {
flag = false;
…

George Tsopanoglou
- 53
- 1
- 4
2
votes
1 answer
Mutate changeset field value with ember-bootstrap custom element
I'm on Ember 3.15 (Octane). With the following setup
template
component

reggaemahn
- 6,272
- 6
- 34
- 59
2
votes
1 answer
Why do I get 'this is undefined' in my Octane component methods?
I'm writing some Octane-style components in Ember v3.13, together with the {{did-insert}} ember-render-modifier. However, when the function tied to did-insert is called, I get TypeError: this is undefined. What am I doing wrong?
Here's my component…

handlebears
- 2,168
- 8
- 18
1
vote
1 answer
Is there a way to call an Ember Octane component method with parameters and have it return the text without implementing a helper?
On Ember Octane versions, how would I call a method in the component.js so that it simply returns the string value into the hbs template (without creating a helper)?
For example, I want for each item in the list, pass the index value as a parameter…

djmistral
- 57
- 5
1
vote
2 answers
How to replace `@computed` with setter returning new value with new native setters?
Problem
I've often used this kind of computed properties where the setter simply returns the new value :
@computed('args.myValue')
get myValue() {
return this.args.myValue;
}
set myValue(newValue) {
return newValue; // <==== this is…

louiscoquio
- 10,638
- 3
- 33
- 51
1
vote
2 answers
Emberjs Model from route returning undefined in controller
I have a strange behavior with my Ember app. I can't make any sense out of it.
Basically I'm using Ember octane and I wanted to access my model from my route to my controller .
This is my route
import Route from '@ember/routing/route';
export…

Neil
- 27
- 3
1
vote
1 answer
Ember: this.router.refresh() throws error in ember octane
This is the below code I am using while doing refresh the route
export default class MyController extend Controller {
@service router;
@action refresh() {
this.router.refresh()
}
}
While calling this.router.refresh() it throws…

Mari Selvan
- 3,598
- 3
- 21
- 36
1
vote
1 answer
Getting properties of ember component from ember component-class
I have been trying to get the value of a property of a component from action from its class. My main goal is to relate two objects: the "auction" passed into my component (shown in the code below)
new.hbs

B Porto
- 27
- 1
- 5
1
vote
0 answers
Conditional based showing sections on based of answers selected in ember octane
I have a JSON Data with multiple section where sections will be shown on user click of next button one after other .Here I am need to add condition (for example : if user is selected yes in section 1 for a question and in section 3 we will add…

Premnath Reddyvari
- 11
- 2
1
vote
1 answer
How to pass a @tracked object from an Ember route model hook
My question is two-fold:
Where is the best place to put some kind of polling logic - in the route file right?
How do I pass this constantly updating value from the Route to some child component? Labeling some variable as "@tracked" and then…

Sticky
- 3,671
- 5
- 34
- 58
1
vote
1 answer
Is it possible to make a route's model a computed / tracked property?
I'm trying to have a route's model hook return some array that is constantly updated via a polling mechanism using Ember later. The route file looks like this:
export default class IndexRoute extends Route {
recent: [],
init() {
...
…

Sticky
- 3,671
- 5
- 34
- 58
1
vote
2 answers
EmberJS Octane set focus on element
I have component that contains a number of text areas and a button to add another text area. When the user clicks the button, a new text area is added. I want the focus to move to this new text area.
I saw this answer but it's for an older version…

Ian Kirkpatrick
- 1,861
- 14
- 33
1
vote
0 answers
After upgrade to ember 3.15, helpers that yield promised recompute infinitely
I am having trouble zeroing in on this bug, but something happened when I upgraded from 3.13 to 3.15. In some (but not all) templates where I use the result of a helper in a let block, the helper will be rerendered infinitely.
{{#let…

John Larson
- 71
- 7
1
vote
1 answer
Ember 3.15, seperating components javascript from template files
Is it possible to separate the templates .hbs from component class javascript .js in Ember 3.15 Octane.
A folder structure like:
app/
components/
js/
hbs/

Jamiu Adeleke
- 43
- 5