karan
1
How do you use $ionicScrollDelegate with anchorScroll, i am able to make it working just by using angular function anchorScroll ,check this punker,
but when i start using same concept with ionic, i cant make it work. Is there anything i have to do to make it to work with ionic,
this is my plunker with ionic :
what i need is in my openstartmodal i need startView at 07:30 and in close model startView by 17:30,
(JFYI: these two functions are called in same controller.).
Any help much appreciated, thanks in advance.
i think it is a timing problem.
if you show your modal -> you get a promise, which is resolved, when modal is complete shown.
xxx.show().then(function () {
// modal is totally visible
// now do anchor scroll
});
If that does not work… try to get it working without an modal.
And post here again thanks.
karan
3
Hi , I updated the plnkr, It works without model, Please have a look, Any Help ??
works like charme, but you:
$scope.openModalEnd = function() {
$scope.modalEnd.show().then(function (modal) {
$scope.gotoEnd = function() {
$timeout(function() {
$location.hash("80");
$ionicScrollDelegate.anchorScroll(true);
});
}
});
};
you capseled your $timeout in another scopefunction you never call.
try
$scope.openModalEnd = function() {
$scope.modalEnd.show().then(function (modal) {
$timeout(function() {
$location.hash("80");
$ionicScrollDelegate.anchorScroll(true);
});
});
};