vendredi 9 janvier 2015

ember route name taking care of the path

I need to write a <link rel="canonical" href="http://ift.tt/1A0VL6g"/>. I'm getting half way with the code below, but I'm missing the translation that is in the router. How can the CURRENT_PATH reflect the url?


current code in the ApplicationController: setCanonicalURL: function() { 'use strict';



$('head link[rel="canonical"]').attr("href", "http://website.com/" + this.get('currentRouteName'));


}.observes('currentRouteName'),


This gives me http://ift.tt/1tTTeye while I want it to be http://ift.tt/1tTThKl


My router contains:



this.resource('search', { path: '/products'} , function(){
this.route('index');

Aucun commentaire:

Enregistrer un commentaire