Try running the anchorScroll() function in a $timeout (with no delay 
specified):
$timeout(function() {
    $anchorScroll();
});

This will ensure the new question is in dom before trying to scroll to it.

On Monday, February 17, 2014 2:48:41 PM UTC+2, swarupa shet wrote:
>
>  
>  
>  Here is my angular-js problem: (angular version 1.2.4)
>
>  We have 5 questions and a submit button on a html page. After clicking 
> on the submit button 6th question is displayed depending the answers chosen 
> for question 1 to 5. 
> The requirement is to scroll to 6th question when it is displayed. 
>
>  We have used anchorscroll() of angular. It is somehow not scrolling to 
> the required place. when we click the button 2nd time it scrolls to the 
> required section of the page. 
>
> we are using (id="xxxxx") to set the scroll location. 
>
>  Please let me know if you have any idea for tackling this problem. 
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to