Questions tagged [ember-controllers]

73 questions
1
vote
2 answers

Sort Ember Object Array with Promises

I have a model model/person { firstName: DS.attr( 'string'), lastName: DS.attr( 'string'), email: DS.attr( 'string' ), } and another model model/project { name: DS.attr( 'string' ), code: DS.attr( 'string' ), …
1
vote
2 answers

Replace Ember.ArrayController.create() will not resolve belongTo relationships | ember upgrade 3.x

I'm in the process of upgrading and I'm facing issues because ArrayController is being deprecated. In my old Ember 1.13 route I'm using model/announcement.js export default DS.Model.extend( { id:DS.attr('string'), title: DS.attr( 'string'…
1
vote
1 answer

ember computed not being updated

i have a computed property in ember isCurrentUserLikeIt: Ember.computed('likestatuses.@each.user_id', function () { const userId = parseInt(this.commonService.getId()); const likestatuses = this.get('likestatuses'); return…
1
vote
1 answer

Ember _ How to access to a controller action from a component controller

I'm trying to add some outter functionality to an ember component . The component is the following one : app / templates / programmers.hbs {{echo-hlabel-tf id= "id-test-hlabel" class="class-test-hlabel-mio" label="Horizontal textfield" …
Yago
  • 319
  • 1
  • 3
  • 18
1
vote
1 answer

ember js, continuously invoke init method in controller when user visit page

i have a controller script in ember and iam using init() method in controller. this is my script export default Ember.Controller.extend({ ....., init() { this._super(...arguments); this.set('idUser', this.commonService.getUser().id); …
cahyowhy
  • 553
  • 2
  • 9
  • 26
1
vote
1 answer

In Ember, how can I handle an action sent from a controller in another controller

I have a controller A that sent an action with this.send('makeItHappen'), and I want to handle it in controller B. How do I do it? JS: // controllers/documents/datasets/controller-A import Ember from 'ember'; export default…
Shaoz
  • 10,573
  • 26
  • 72
  • 100
1
vote
1 answer

How can I access controller properties from inside router?

I'm using willTransition hook inside my router as follows. actions: { willTransition(transition) { this._super(...arguments); //some code goes here } } Is there a way to access some property here that is…
Channa
  • 3,267
  • 7
  • 41
  • 67
1
vote
1 answer

three.js animations in ember js

How should i create a render loop of three.js for animations in ember js. The code that i have till now is import Ember from 'ember'; export default Ember.Controller.extend({ scene: new THREE.Scene(), camera: new THREE.PerspectiveCamera(75, …
georoot
  • 3,557
  • 1
  • 30
  • 59
1
vote
2 answers

ember 2.0: use same controller in several routes

How to specify which controller to use in a route in ember 2.0? Default is that each route has its own controller and if I don't have code for a controller then a default empty controller is generated at runtime. I want to specify that several…
Vilhelm H.
  • 1,315
  • 1
  • 7
  • 15
1
vote
1 answer

Pass property to component and then used it as conditional (ember js)

application controller isHotel_profile: function (){ return this.get('currentPath') === 'hotel'; }.property('currentPath'), component {{#step-controller hotelPage=isHotel_profile}} {{/step-controller}} and here's the component template {{#if…
1
vote
1 answer

Ember JS: render same view twice ( with data from one controller )

I have an Ember JS drag & drop view which is used to connect items to a bigger piece. As the construct grows it overlaps the viewport vertically. What I want to do now is to have a small preview-view of the d&d view. I want the controller data from…
1
vote
1 answer

context of view and render helper emberjs

I got quite confused about the context of the template, see the code below var App =…
eded
  • 3,778
  • 8
  • 28
  • 42
1
vote
1 answer

request process in emberjs

I am new guy to emberjs, I want to know flow of request in emberjs. There are some query related to emberjs: what is specific role of controller in emberjs, wherever I have seen we can create action in template. There is standard naming convention…
Jack Jam
  • 11
  • 1
1
vote
2 answers

subdirectories within ember controller not working

from this post it seems that sub directories within ember controller should work. https://github.com/ember-cli/ember-cli/issues/1219 however its not working for me . here is my code branch like (directory cm contains a child directory views): …
user3630294
  • 51
  • 1
  • 8
1
vote
1 answer

how to trigger Emberjs actions defined in itemController

Is there way a way to trigger an action defined in the itemController. When I trigger the action with