Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Delay $anchorScroll() to handle autoscroll for nested ng-includes. #2639

Closed
wants to merge 1 commit into from

Conversation

torgeir
Copy link

@torgeir torgeir commented May 11, 2013

This resolves an issue where the contents of an ng-include also contain an ng-include with autoscroll, like this <div ng-repeat=".." ng-include=".." autoscroll="">.

In issue #2637 the element to scroll to by using #some-anchor-name in the url, e.g. <a name="some-anchor-name"></a>, is not present in the dom by the time $anchorScroll() is called from the ngIncludeDirective.

This resolves an issue where the contents of an `ng-include` also contain an ng-include with autoscroll, like this `<div ng-repeat=".." ng-include=".." autoscroll="">`. 

In issue angular#2637 the element to scroll to by using `#some-anchor-name` in the url, e.g. `<a name="some-anchor-name"></a>`, is not present in the dom by the time `$anchorScroll()` is called from the ngIncludeDirective.
@petebacondarwin
Copy link
Contributor

PR Checklist (Minor Bugfix)

  • Contributor signed CLA now or in the past (if you just signed, leave a comment here with your real name)
  • PR doesn't introduce new api
  • PR doesn't contain a breaking change
  • PR contains unit tests
  • PR contains e2e tests (if suitable)
  • PR contains documentation update (if suitable)
  • PR passes all tests on Travis (sanity)
  • PR passes all tests on ci.angularjs.org (cross-browser compatibility)
  • PR is rebased against recent master
  • PR is squashed into one commit per logical change
  • PR's commit messages are descriptive and allows us to autogenerate release notes (required commit message format)
  • All changes requested in review have been implemented

@torgeir
Copy link
Author

torgeir commented May 13, 2013

Wow, I'll se what I can do.

@petebacondarwin
Copy link
Contributor

@torgeir - Any update on this?

@torgeir
Copy link
Author

torgeir commented Jul 11, 2013

No, I haven't got around for this. Any pointers to what's not passing as far as the testing goes? E.g. for the cross-browser compatibility

@IgorMinar
Copy link
Contributor

please have a look at these tests and use the template from your commit message to reproduce the error: https://github.com/torgeir/angular.js/blob/4fa878b580fd9799d80931a8ccc14856ec640bc4/test/ng/directive/ngIncludeSpec.js#L235-L298

@petebacondarwin
Copy link
Contributor

@torgeir - have you signed the CLA?

@mhevery
Copy link
Contributor

mhevery commented Jul 31, 2013

Unless there is further activity on this, will close next week.

@IgorMinar
Copy link
Contributor

I'm sorry, but I wasn't able to verify your CLA signature. CLA signature is required for any code contributions to AngularJS.

Please sign our CLA and ensure that the CLA signature email address and the email address in this PR's commits match.

If you signed the CLA as a corporation, please let me know the company's name.

Thanks a bunch!

PS: If you signed the CLA in the past then most likely the email addresses don't match. Please sign the CLA again or update the email address in the commit of this PR.
PS2: If you are a Googler, please sign the CLA as well to simplify the CLA verification process.

@torgeir
Copy link
Author

torgeir commented Dec 7, 2013

Alright, signed.

@unludo
Copy link

unludo commented Jan 20, 2014

Hello, the demo is not working for me.
http://docs.angularjs.org/api/ng.$anchorScroll#bottom has no effect if I run the demo in the page.
The jsFiddle is working though.
So it is with 1.2.9 and chrome 32.0.1700.76 m on windows7.
Does somebody have the same issue ?
Thanks!

@jeffbcross jeffbcross force-pushed the master branch 4 times, most recently from e8dc429 to e83fab9 Compare October 10, 2014 17:37
@IgorMinar
Copy link
Contributor

no tests. no merge. sorry

@IgorMinar IgorMinar closed this Oct 11, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants