0
votes

I have a template where I display information about my model.

Everything works great and it's all done by Ember. The model hook and setupController are done automatically since I use a route with a model_id parameter. I don't set them manually anywhere.

I wanted to add something, and the first thing I did was to create an empty controller. I wanted to eventually add some properties to it.

Let's say I have templates/model/view.hbs, I created controllers/model/view.js.

It's an empty controller. This is the content of the file:

import Ember from 'ember';

export default Ember.Controller.extend({
});

When I run my app, the template appears, but it's empty. It's not a blank page, it's just that what I'm printing from the model doesn't show up.

When I delete the file, everything comes back to normal.

How come an empty controller can break my app like that? I tried creating a route file and set the model and setupController manually, but that doesn't work either.

I use ember-cli and Ember 1.10. The controller is created through ember-cli.

1

1 Answers

1
votes

It depends what type of object the model is. Is this an array of models or a single model? What does your template look like? Does it reference them using model.foo or just foo?