点击浏览器后面的“按钮”时,内容不会显示

时间:2018-03-06 09:51:17

标签: ember.js ember-data

下面是我的router.js,这是url的示例     www.myUrl/slugName,页面本身会显示我需要的所有内容和数据 但是当我去www.myUrl/slugName/cities/1/areas然后击中时     我浏览器的后退按钮,www.myUrl/slugName的内容未显示。

有没有人对我的内容有相同的体验     www.myUrl/slugName没有显示。我的东西有问题吗?     router.js?此外,当我刷新页面时,会显示预期的内容。

this.route('landing-page', { path: ':slug' }, function() {
   this.route('cities', function() {
      this.route('show', { path: ':city_id/areas' });
   });
});

以下是我的route.js

model(params) {
 return Ember.RSVP.hash({
   shop:      this.store.findRecord('shop', params.slug)
                .catch(() => this.transitionTo('welcome.shops.index')),
   cities: this.store.query('city', {
     filter: { shop: { slug: params.slug } }
   }),
 });
},

0 个答案:

没有答案
相关问题