Questions tagged [ember-octane]

61 questions
1
vote
1 answer

ember-changeset-validations not validating properly

I'm on Ember 3.15 (Octane) and trying to get ember-changeset-validations working by following the examples on their github but having a hard time getting it to validate. There are no (code related) errors in the console but changeset.isValid always…
reggaemahn
  • 6,272
  • 6
  • 34
  • 59
1
vote
1 answer

Write Ember Octane Component test to check if state is correct after I submit a form?

I want to write a test such that when I submit a string, then a @tracked array =[0,0,0] field will change. I have a simple for hbs. if input is 1 then the tracked array becomes [0,1,0]. How do I do this?? …
1
vote
1 answer

Proper way to toggle classes in Ember Octane with Handlebars?

I want to toggle between class display on and display-off using Ember.js Octane. How do I do this? Do I need an @action or @tracked? flower or flower
Noob2321
  • 41
  • 2
1
vote
1 answer

Convert Ember addon to web component

How to convert an ember addon to web component? https://github.com/BBVAEngineering/ember-cli-web-components This plugin is not working, I am getting, defineCustomElements is not defined error. Then I found glimmer can create web components. With…
1
vote
1 answer

setApplication breaks ember-qunit test context

I recently upgraded an Ember app from 2.18 to 3.13 which went smoothly. Today I tried to add an acceptance test for the first time (only had integration / unit tests before this) but the test is failing on the first line: import { module, test }…
stevenelberger
  • 1,368
  • 1
  • 10
  • 19
1
vote
2 answers

In EmberJS how can you use transition data in a controller?

I am getting the transition data in the route js file like so: beforeModel(transition) { console.log(transition) } And I want to use it in a function in my controller like this: import Controller from '@ember/controller'; export default class…
UXCODA
  • 1,118
  • 2
  • 18
  • 33
0
votes
1 answer

Ember JS Issues With Trying To Pass an Action Into a Named Block

I'm trying to make a modal component from scratch in ember js and I'm running into an issue with the button to open the modal. I want to allow the open button to be passed to the component using a block called <:buttonContent> and…
0
votes
1 answer

How to access child component from parent component in Ember

The concept is fairly simple. Assume I have a child component with its own separate js and hbs. Child-component.hbs =>
0
votes
1 answer

Ember Octane - How to loop through model records inside a component?

I have an array of strings passed as an argument to a component, inside the component I am using "each" helper to render each string in a text input. I tried the following approach. I have a model passed as an argument to a component. I'm using…
0
votes
1 answer

Ember has-block to detect empty block

In ember octane, is there a way to detect {{yield}} is not an empty string? The has-block function will return true if we use an empty component like this while false when . How do I get…
RonPringadi
  • 1,294
  • 1
  • 19
  • 44
0
votes
1 answer

Dynamic model in LinkTo component in Ember

I am using Ember 3.18, I am facing the below issue. Consider the following routes: Router.map(function() { this.route('author'); this.route('author' , {path:"/author/:author_id"}); }); Now, in my hbs file, I am trying to transition to the above…
Panther Coder
  • 1,058
  • 1
  • 16
  • 43
0
votes
1 answer

run time error when embedding monaco editor in ember app

I am trying to use monaco-editor in my ember app, I am using ember-monaco for that. I followed the instructions and added in my application.hbs the following code: {{code-editor language="typescript" code=sample1 onChange=(action (mut…
dina
  • 4,039
  • 6
  • 39
  • 67
0
votes
1 answer

Invalid syntax on EmberJS Octane observers

I'm trying to use Ember observers with EmberJS Octane latest version (4.1.0), but it does not seem to work. Here is what I'm trying to achieve : export default class SummaryService extends Service { @service store; @service authentication; …
louiscoquio
  • 10,638
  • 3
  • 33
  • 51
0
votes
1 answer

Find-by with multiple attribute in Ember.js Octane

I have a route with RSVP that load several models (categories with items, treatments, prices) which return in JsON API Forrmat and want to show them in a table: Item Name Treatment Name 1 Treatment Name N Category 1 Item 1 in Cat 1 Price…
0
votes
1 answer

Open one component instance at a time in Ember Octane

Let's say we have component answer that has isOpen property. By default isOpen is false and when the user is clicking on the answer we are changing the isOpen to true. We are showing the list of answers. How can we close the first answer when the…
spirito_libero
  • 1,206
  • 2
  • 13
  • 21