lundi 26 janvier 2015

Extending link-to

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.





Aucun commentaire:

Enregistrer un commentaire