Questions tagged [ember-components]

Ember Components is a core piece of ember.js framework that describes the behaviour of the view. Components consist of two parts: a template to describe the UI and a js code to implement the behaviour.

Ember component is defined in Ember Guide. It has own chapter in the guide. The documantation can be found in Ember Api Doc.

130 questions
31
votes
9 answers

Combine linkTo and action helpers in Ember.js

I need to combine linkTo and action helpers in Ember.js. My code is: {{#link-to 'index'}}Clear{{/link-to}} But I would like to make this something like this: {{#link-to 'index' {{action 'clear'}}…
Daniel Kmak
  • 18,164
  • 7
  • 66
  • 89
7
votes
3 answers

Where to place CSS files in Ember.js?

We have some custom style definitions in our application. Currently all developers are adding styles to the app.css. But we don't want to make it a huge file. And also we don't want to mess the style classes. How can we place our custom styles on…
ykaragol
  • 6,139
  • 3
  • 29
  • 56
7
votes
2 answers

How to focus/blur on a component in ember integration tests?

How can I trigger focus and blur events while testing an Ember.js component? this.$().focus(); or this.$('input').focus(); seems working but behaves different in phantomjs and chrome. Also this.$().blur(); or this.$().focusout(); seems not working…
ykaragol
  • 6,139
  • 3
  • 29
  • 56
5
votes
1 answer

Ember ember-views.render-double-modify deprecation

I am trying to eliminate a deprecation that I recently introduced into my code and I need some help. The deprecation is: You modified ... twice in a single render. This was unreliable in Ember 1.x and will be removed in Ember 2.0 [deprecation id:…
DanMonroe
  • 155
  • 1
  • 7
5
votes
1 answer

How to render Ember component dynamically

Rendering a component works well when using {{component-name}} in template. I want to render a component from route with dynamic parameters. I've tried this App.ApplicationRoute = Ember.Route.extend({ init: function(){ …
Tomas
  • 1,377
  • 3
  • 17
  • 32
4
votes
3 answers

how to bind Application controller property in another controller ember

i have search property in ApplicationController and its linked with input field of searching. i want to access search field of ApplicationController in ProjectController. it should be sync. i use following code but its not working. /…
4
votes
1 answer

Ember.js 1.13: The right way to observe a passed-in attribute of component?

I'm trying to upgrade my project to Ember 1.13, and I'm a bit confused about the behavior of new attrs of component, especially when I have to observe them. For example, my test component observes bar which is a parameter passed from outside. I know…
starshine wang
  • 616
  • 1
  • 8
  • 13
4
votes
1 answer

Difference between `template` and `layout` properties of Ember Component?

The API doc says: Specifying a component's templateName is deprecated without also providing the layout or layoutName properties. So what's the difference between template and layout for a component? And in what situation will we need to specify…
starshine wang
  • 616
  • 1
  • 8
  • 13
4
votes
1 answer

emberjs-2.0 dynamically add more component on click

I have component called display-me. I can add multiple of that same component to thesame template as shown in the jsfiddle by adding multiple calls to that component like this: