angularjs - is it possible to have a full url route to a anchored element on the same page? -
I have Users will have to click About this and scroll over the However, I am struggling to see how I can use these routes, and even without reloading that jquery slide interaction, the template / view defined in my routes. Ideally, I like URLs like Any help? Edit: Here I have tried so far and it does some work without animation .. In my navigation controller I have the following .. However, it works only when a user clicks the button on the page, and does not eat the URL at all. Does this mean you? (not my code) Anchor is included in the URL, and the run function hash moves on the module. ($ $ root scope, $ location, $ anchor scroll, $ route param) {$ Root Scope. $ ('$ RouteChangeSuccess', function (new route, old route) {$ location.hash ($ routeParams .scrollTo); $ anchorScroll ();})}} Hope That it helps you .. html5mode (true) set in my code and all my contents are in the same See.
#about element, it works very well with jquery because you can easily You can animate the scrolling and make it good and fluid.
example.com/about ,
example.com/contact and just behind those scenes, scroll them over that element
$ scope.scrollTo = $ root scope. $ ('$ LocationChangeStart', function (e, n, c) {e.preventDefault (); $ location.hash ('about'); $ anchor scroll ();});
& lt; A href = "# test? ScrollTo = foo" & gt; Test / Foo & lt; / A & gt; & Lt; A href = "# weee? ScrollTo = bar" & gt; V / bar & lt; / A & gt;
Comments
Post a Comment