1
이 내 코드입니다 주소 :리디렉션
App.Router.map(function() {
....
this.resource('profile', function() {
this.route('user');
this.route('user.edit', { path: '/:user_id/edit' });
this.route('password');
this.route('company');
this.route('company.edit', { path: '/:company_id/edit' });
this.resource('products', function() {
this.route('index');
this.route('show', { path: '/:product_id/show' });
});
});
....
});
App.ProfileRoute = Ember.Route.extend({
redirect: function() {
this.transitionTo('profile.user');
}
});
을 그리고 나는 link-to
있습니다 #/profile/products/index
에 연결되어
{{#link-to "products.index" }}<i class="icon-barcode icon-2x pull-left icon-border"></i>{{/link-to}}
합니다. 그러나 이는 ProfileRoute
의 리디렉션을 트리거합니다. 이는 원하지 않습니다. #/profile
또는 #/profile/index
에 액세스 할 때 만 리디렉션되어야합니다.
어떻게하면됩니까?