Hi,
I have back button issue. Please help me to resolve this issue.
Issue: My current page is dashboard and content area have a link to same page(dashboard).
If user clicked that link and its not doing anything after that back button is not working.
Hi
Real time scenario for this issue is
- I have a page called user feed,
- it will have logged in user(User-A) posts and logged in user friends post(User-B).
- if User-A click on User-B name it will redirect to user-B profile page.
- The user-B profile page have basic information of User-B and post which created by User-B
- Again User-A clicked that User-B name on other post its not doing any redirection but after that back button was not working.
The user profile page
Actual code:
{
path: '/user/:uid',
name: 'userprofile',
async: function (routeTo, routeForm, resolve, reject) {
var userinfo = app.form.getFormData('userinfo');
app.request.post(serviceurl + 'profdetails_basic', {
uid: userinfo.uid,
wall_owner_id: routeTo.params.uid,
}, function (response) {
var needs = JSON.parse(response);
resolve({
componentUrl: './pages/user.html'
}, {
context: {
userinfo: (needs.basic_info) ? needs.basic_info: '',
}
});
});
}
}
and on Page init of userprofile page i have below coding.
pageInit: function (e, page) {
var self = this;
var $ = self.$$;
var userinfo = app.form.getFormData('userinfo');
app.request.post(serviceurl + newsfeed_fetch', {
uid: userinfo.uid,
wall_owner_id: self.$route.params.uid,
type: 'user_wall',
}, function (response) {
var needs = JSON.parse(response);
if (needs) {
console.log(needs.activity[needs.activity.length - 1].timestamp);
$$('.view-main').data('luatime', needs.activity[needs.activity.length - 1].timestamp);
needs.activity.forEach(function (element) {
$$('.ufeed').append(T7status_template(element));
});
} else {
self.allowInfinite = false;
$(self.$el).find('.preloader').remove();
var context = { message: 'No Activity Found!' };
$(self.$el).find('.ufeed').append(T7info(context));
}
});
}
Are you sure you are on latest v2? I remember such issue with async
route was somewhen a while ago
That was fixed on 2.1.1, and I discovered it haha
1 Like