Questions tagged [ember.js]

Ember.js is a component-service application framework written in JavaScript. Consider making your question easier to answer by using the preconfigured templates mentioned in this tag's wiki. (Always specify version of ember used when describing your issue)

Ember.js is a application framework distributed under an open source license.

Ember.js provides a templating mechanism based on templates for view components, as well as facilities for an easy and tightly-integrated test process. It is easily embeddable into existing applications.


Getting Help

The Stack Overflow tag is actively monitored by several contributors to Ember. There is also an official Discord server. Other resources can be found on the Ember.js community page

Additionally Ember.js has a page on Debugging: Debugging Ember

Technical questions that are accompanied by working code make it easier for other to help give good answers.

To report bugs against Ember.js, or to propose new functionality, create an issue on the GitHub project.

Packages and add-ons

You can find various packages, add-ons on these websites:

Preconfigured Templates

Use these templates to help create an easier to answer question.

Related Stackoverflow Tags

Resources/Tutorials

23976 questions
76
votes
6 answers

EmberJS: How to load multiple models on the same route?

While I am not new to web development, I am quite new to to client-side MVC frameworks. I did some research and decided to give it a go with EmberJS. I went through the TodoMVC guide and it made sense to me... I have setup a very basic app; index…
Eric
  • 1,020
  • 1
  • 12
  • 18
72
votes
8 answers

How do I add a separator between elements in an {{#each}} loop except after the last element?

I have a Handlebars template where I'm trying to generate a comma-separated list of items from an array. In my Handlebars template: {{#each list}} {{name}} {{status}}, {{/each}} I want the , to not show up on the last item. Is there a way to…
Chris Thompson
  • 16,203
  • 9
  • 45
  • 62
68
votes
13 answers

npm install fails in jenkins pipeline in docker

I'm following a tutorial about Jenkins pipeline and I can get a "hello world" working under at node 6.10 docker container. But, when I added a default EmberJS app (using ember init) to the repo and attempt to build that in the pipeline, it fails…
les2
  • 14,093
  • 16
  • 59
  • 76
62
votes
2 answers

How and when to use Ember.Application register and inject methods?

I'm trying to understand how to use Ember.Application register & inject methods What use case are these functions designed for? How are they to be used and when? I'd really like to know!
Taras Mankovski
  • 1,639
  • 3
  • 16
  • 30
60
votes
2 answers

Violating Content Security Policy directive after ember-cli 0.0.47 upgrade

I upgraded my ember-cli app to 0.0.47 and am now getting a bunch of errors in my browser console related to the content security policy. How do I fix this issue? Refused to load the script 'http://use.typekit.net/abcdef.js' because it violates the…
Peter Brown
  • 50,956
  • 18
  • 113
  • 146
60
votes
2 answers

Ember js - Hasmany relationships breaks after updating other tables

I am using Ember.js with local-storage-adapter. I have a weird problem while updating records. I have a post and comments model with hasMany relationships: App.Post = DS.Model.extend({ title: DS.attr('string'), comments:…
viji
  • 1,652
  • 2
  • 20
  • 34
56
votes
1 answer

Getting "Uncaught Error: Assertion Failed: Ember Views require jQuery between 1.7 and 2.1" with app created through ember-cli

I'm starting with ember. I followed the Getting Started guide at emberjs.com and managed to create a new ember application by running the following commands: npm install -g ember-cli ember new sample-app Everything went successful and I can see the…
Daniel B. Lopez
  • 663
  • 5
  • 5
56
votes
4 answers

ember.js + handlebars: render vs outlet vs partial vs view vs control

There are scattered explainations of each around, but I'm still not 100% clear on the differences & usage. Could someone give me a side-by-side comparison? {{outlet}} {{outlet NAME}} {{render}} {{partial}} {{view}} {{control}} Note: this post was…
doub1ejack
  • 10,627
  • 20
  • 66
  • 125
55
votes
4 answers

infinite scroll with ember.js (lazy loading)

I have a view where there can be a large number of items for the user to scroll through and I'd like to implement infinite scrolling to enable progressive loading of the content. It looks like some folks have done pagination but Google doesn't…
outside2344
  • 2,075
  • 2
  • 29
  • 52
54
votes
1 answer

Ember CLI testing complicated model relationships

As far as I can see, when testing ember-data models in ember CLI, all relationships have to be listed in needs. This is fine if the structure is simple, but in many cases there will be multiple layers. For example, if models are set up with the…
aquavitae
  • 17,414
  • 11
  • 63
  • 106
54
votes
3 answers

Add class to ember link-to

I try to build a link to a nested route and want to add a class to this link (for twitter bootstrap) The result should something like this: < a href="/#/rents/42" class="btn btn-primary btn-small">do something< /a> First try: {{#link-to "rent"…
user2016429
  • 545
  • 1
  • 4
  • 5
53
votes
2 answers

Ember.js: Reloading a .hasMany relationship given through "links" in payload

Say I have two models, Topic and Post: App.Topic = DS.Model.extend({ posts: DS.hasMany('post', { async: true, inverse: 'post' }); }); App.Post = DS.Model.extend({ topic: DS.belongsTo('topic', { async: true }); }); Topic hasMany Posts, and a…
Mike
  • 4,071
  • 21
  • 36
52
votes
5 answers

Check for a value equals to in Ember Handlebar If block helper

How do we check for a value equality in ember.js's If-block helper? {{#if person=="John"}} How do we perform above in handlebars?
user1338121
  • 785
  • 1
  • 8
  • 13
51
votes
1 answer

EmberJS actions - call one action from another when wrapped within `actions`

How do you call one action from another action when wrapped within actions in an EmberJS controller? Original code that uses the now deprecated way to define actions: //app.js App.IndexController = Ember.ArrayController.extend({ // properties …
bguiz
  • 27,371
  • 47
  • 154
  • 243
51
votes
15 answers

emberjs - how to mark active menu item using router infrastructure

I'm trying to create navigation tabs (taken from Twitter Bootstrap): The active tab is…
coxx
  • 1,019
  • 2
  • 9
  • 7