Questions tagged [ember-octane]
61 questions
6
votes
1 answer
What is the correct way to convert observer to octane version of ember?
I was trying to convert all my ember-component into OCTANE version. But I got a bigger doubt. How can I convert the observer code into an OCTANE version? For example,
parent.hbs
child.hbs
…

Mari Selvan
- 3,598
- 3
- 21
- 36
6
votes
1 answer
How to invoke an action in the current router from the child component in Ember Octane?
I am working with Ember Octane version, I want to invoke an action in the Route from the child component. The pseudo code is as follows.
**Route**
export default class SomeRouter extends Route {
model() {
return data;
…

Murali Nepalli
- 1,588
- 8
- 17
4
votes
0 answers
Testing Service Worker Ember Octane
I am using ember-service-worker to implement offline behavior for my app, so far it does what I need, but I am wondering how can I write some test for my app, to test the service worker is doing his job properly and also because this breaks my…

Hector Carrillo
- 41
- 3
4
votes
1 answer
Integrate monaco editor into ember octane
I try to integrate the monaco code editor into my ember octane application. Currently I'm using the ESM import style and confirming to the manual, I installed the webpack loader plugin and integrated it into my ember-cli-build.js
const EmberApp =…

andreas.teich
- 789
- 1
- 12
- 22
4
votes
2 answers
Ember Octane and JQuery
For the past few weeks i've been playing with ember octane which in my opinion is awesome.
I've tried a few ember plugins in order to test which plugins are working currently with ember octane, some of them require jQuery to work.
So my question is:…

Nik Ntaf
- 43
- 1
- 5
3
votes
1 answer
Best approach to caching in Ember Octane
I have a project running Ember@3.20. We are currently in the process of migrating from classic to glimmer based components and have come across some expensive computational patterns which would benefit from caching.
My question is, what is the best…

jackalope
- 33
- 2
3
votes
1 answer
Ember Octane (3.22+) why use {{on 'click' this.function}} instead of onclick={{this.function}}
So in Ember Octane there are two ways of attaching a function to an event in an hbs file.
The EmberJS way: {{on 'click' this.function}}
Classic HTML way: onclick={{this.function}}
Here they suggest using the prior syntax
However I don't see a reason…

Abe
- 421
- 3
- 11
3
votes
2 answers
How to update nested state in Ember Octane
So my situation is as follows:
I got a component with a couple of input fields that represent a contact and are filled with data from a service:
@service('contact-data') contact;
Each field stands for one property that is accessed…

Grex L
- 43
- 4
3
votes
1 answer
How to pass an "action" from a template to it's grand child components in Ember Octane
I am trying to pass an "action" from the controller to the grandchild component of the current template. But it fails for somereason. Could anyone let me know what am I missing here.
MainTemplate's Router Controller
export default class…

Murali Nepalli
- 1,588
- 8
- 17
3
votes
1 answer
How do I make an optional action for an Octane component?
I want to write an Octane/Glimmer style component where passing in the action is optional. What is the best way to write this?
For example, I want both of these uses of the component to be valid:

handlebears
- 2,168
- 8
- 18
3
votes
1 answer
generate model syntax different to tutorial
ember octane tutorial. using: ember generate model person creates a build error when used for person model (and any other model for that matter).
I was looking at the ember octane tutorial and generated the person model. The generated code included…

Stuart Guthrie
- 31
- 1
2
votes
0 answers
Ember Data JSON API - How to make a PATCH request using a related links URL
Ember version: 3.23
Ember Data: 3.23
I want to patch a relationship by making a request to the URL provided in the links object in the resources relationships:
{
"type": "appointments",
"id": "1",
"attributes": {},
"relationships": {
…

Baller
- 53
- 1
- 6
2
votes
1 answer
Is this a valid usage of @cached for autotracking of Ember Octane?
Recently I encountered an use case of @cached from tracked-toolbox when writing a Glimmer component with autotracking. Here is an example code snippet:
import Component from '@glimmer/component';
/**
* Example usage
*

Qiu Yudong
- 41
- 3
2
votes
1 answer
Glimmer.js how to reset tracked property to initial value without using the constructor
In Glimmer.js, what is the best way to reset a tracked property to an initial value without using the constructor?
Note: Cannot use the constructor because it is only called once on initial page render and never called again on subsequent page…

bach vo
- 410
- 4
- 5
2
votes
1 answer
How to handle deprecated 'ready' model lifecycle hook in ember-data?
I am currently transferring from Ember 2.18 to Ember 3.16. In my models I make use of the ready function to create default values for relationships if a new instance is created.
// app/models/human.js
import Model, { hasMany } from…

elfin-sbreuers
- 86
- 6