Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AngularJS Compatibility? #89

Open
solarisfire opened this issue Dec 21, 2015 · 3 comments
Open

AngularJS Compatibility? #89

solarisfire opened this issue Dec 21, 2015 · 3 comments

Comments

@solarisfire
Copy link

solarisfire commented Dec 21, 2015

Would love to have this working with AngularJS.

I have jquery, jquery-ui, and tocify included, and if I call .tocify() on a div after the AngularJS digest cycle using $timeout it gives me a table of contents.

However clicking on any element in the toc just directs me to a different route, not to the right position on the page.

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

@agez
Copy link

agez commented Dec 22, 2015

I think that you have to change "history" to false. It is true by default and creates hashes in the URL.

We also use tocify within an AngularJs app for about 3 years. And as far as I remember we had the same issues with routing. Switching "history" to false did the trick.

HTH.

@solarisfire
Copy link
Author

Yup that worked, however it won't stick to the top of the page on scroll. Guess I could always supplement it with something like ngSticky for that...

@solarisfire
Copy link
Author

Getting MAJOR performance issues though, running tocify on the content after each route change. But looks like tocify isn't cleaning up after changing route so is leaking memory...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants