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 scroller="" in directive not working. #147
Comments
Could you create a reduced test case? |
if you're using jqLite only, without jQuery loaded beforehand. you can't look up by selector. |
PR: #171 |
+1 |
@digitaltopo @WickyNilliams @zwacky You can't use the selector, instead you need to include the html string. such as <headroom tolerance='0' offset='0' scroller="<div class='app-view'></div>" classes="{pinned:'headroom--pinned',unpinned:'headroom--unpinned',initial:'headroom'}"></headroom> |
why not just use one api as described in the docs (https://github.com/WickyNilliams/headroom.js#with-angularjs). is there a reason why you don't want to use |
@zwacky
|
you would cut away a lot from the versatility if it would need to be used with
nowadays we are more aware of the webapp size, so fewer are running angular with jquery. |
@zwacky Sorry, but the workaround I said before did not work. It dismissed the console error, but the actual functionality is not working, because Angular.element does not select, instead it creates a copy. |
i see. lemme update my pull request. |
i just checked, there were no commits after this PR. @WickyNilliams you see any problems with this? |
Finally merged this. Sorry for the delay all :) |
I have an absolutely positioned div with an overflow-y:auto on it. I'd like to add headroom to an element within this div. I can't get the scroller="#scrollingcontainer" to work, instead I get this error:
Error: [jqLite:nosel] Looking up elements via selectors is not supported by jqLite!
I have included headroom.js (0.7.0) via bower, and added the dependency:
<script src="bower_components/headroom.js/dist/headroom.js"></script>
<script src="bower_components/headroom.js/dist/angular.headroom.js"></script>
angular
.module('app', [
'headroom',...
In my template I've included the directive:
I've tried these too:
scroller="#scrollingcontainer"
scroller=".scrollingcontainer" (for class)
for the scrolling container also.
What am I doing wrong??? It looks pretty clear in the documentation that you need to enter a selector that the directive then uses to get a dom element...
Any help would be appreciated, thanks!
The text was updated successfully, but these errors were encountered: