mirror of
https://github.com/donl/meteor-ionic.git
synced 2026-05-29 06:12:31 -06:00
28 lines
711 B
JavaScript
28 lines
711 B
JavaScript
Template.ionView.rendered = function () {
|
|
// Reset our transition preference
|
|
IonNavigation.skipTransitions = false;
|
|
|
|
// Reset our scroll position
|
|
var routePath = Router.current().route.path(Router.current().params);
|
|
if(IonScrollPositions[routePath]) {
|
|
$('.overflow-scroll').scrollTop(IonScrollPositions[routePath]);
|
|
delete IonScrollPositions[routePath];
|
|
}
|
|
};
|
|
|
|
Template.ionView.helpers({
|
|
classes: function () {
|
|
var classes = ['view'];
|
|
|
|
if (this.class) {
|
|
classes.push(this.class);
|
|
}
|
|
|
|
return classes.join(' ');
|
|
},
|
|
title: function () {
|
|
if ( Template.instance().data && Template.instance().data.title ) {
|
|
return Template.instance().data.title;
|
|
}
|
|
}
|
|
});
|