Reputation: 3414
After updating app packages (Ember from rc6 to 1.0.0, handlebars from rc4 to 1.0.0 and jquery from 1.9.1 to 2.0.3) all my linkTo helpers stopped to work; if i click on a link i get this warning:
This link-to is in an inactive loading state because at least one of its parameters presently has a null/undefined value, or the provided route name is invalid.
everything else seems to be ok; can someone explain this?
This is my router:
this.resource('eng', function(){
this.route('home');
this.route('aboutUs', {path: 'about-us'});
this.route('newsArchive', {path: 'news-archive'});
this.route('mattressesAreas', {path: 'mattresses-areas'});
this.resource('eng.rent', {path: 'rent' }, function(){
this.route('boulderSmall', {path: 'boulder-small'});
this.route('boulderXl', {path: 'boulder-xl'});
this.route('leadClimbing', {path: 'lead-climbing'});
this.route('speedClimbing', {path: 'speed-climbing'});
this.route('leadClimbingTurret', {path: 'lead-climbing-turret'});
this.route('mattresses', {path: 'mattresses'});
});
this.resource('eng.factory', {path: 'factory'}, function(){
this.route('panelType', {path: 'panel-type'});
this.route('exteriorFinishing', {path: 'exterior-finishing'});
this.route('buildingSystem', {path: 'building-system'});
this.route('design');
});
this.resource('eng.holds', {path: 'holds'}, function(){
this.route('importClimbingVolumes', {path: 'import-climbing-volumes'});
});
this.resource('eng.team', {path: 'team'}, function(){
this.route('alePenna', {path: 'ale-penna'});
});
this.resource('eng.photoGallery', {path: 'photo-gallery'}, function(){
this.route('evolutionClimbing', {path: 'evolution-climbing'});
this.route('pragelatoBoulder', {path: 'pragelato-boulder'});
});
this.route('contacts');
//error catch all
this.route('404', { path: '*:' });
});
and this is an example of my linkTo:
{{#linkTo eng.aboutUs class="nav ck_0"}}About us{{/linkTo}}
Upvotes: 3
Views: 1748
Reputation: 4770
The linkTo helper is now deprecated, you should use link-to to avoid future issues.
E.g. {{#link-to 'post' post}}View post{{/link-to}}
Upvotes: 1
Reputation: 3414
Yes, finally i discovered that i just need to write the route name between quotes in the linkTo helper, like this:
{{#linkTo 'eng.aboutUs' class="nav ck_0"}}About us{{/linkTo}}
I don't know why before was working without quotes and now no, probably something's changed in latest Ember...
Upvotes: 6