1

I'm trying to create a custom link-to helper that will conditionally add query-params depending on the presence of a property. Right now, I'm getting an error: Uncaught TypeError: Cannot read property 'options' of undefined. I've traced that to the line var options = parameters.options in the function resolvedParams.

Here's my code:

In app/components/foo-link.js:

export default Ember.LinkView.extend({
  init: function() {
    this._super();
  }
});

In the template:

{{foo-link title='Bar' hrefBinding='bar'}}

What am I doing incorrectly? Is this even the correct approach? I've already extended SelectView's like this, so I'm not sure why this is so difficult.

I'm using Ember CLI version 0.1.5.

NJP
  • 815
  • 1
  • 7
  • 20
  • why are you extending a view in a component? – flylib Jan 29 '15 at 02:27
  • Because I'm a silly person who couldn't get any of the other extended views to work when I put them in the views folder. I'm pretty new to Ember, and I had managed to extend the `select` view using a similar approach. Maybe I should submit a question that asks why it doesn't recognize views placed in the views folder. – NJP Jan 29 '15 at 17:21

0 Answers0