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

Headroom is not working in Angular #281

Closed
muhammadyou opened this issue Jul 30, 2017 · 2 comments
Closed

Headroom is not working in Angular #281

muhammadyou opened this issue Jul 30, 2017 · 2 comments
Labels

Comments

@muhammadyou
Copy link

I have added headroom and angular.headroom files, then i have injected headroom in my app. Next, i wrapped my nav bar in headroom tag and added following css. However, i couldn't find it working

.headroom {
transition: transform 200ms linear;
}
.headroom--pinned {
transform: translateY(0%);
}
.headroom--unpinned {
transform: translateY(-100%);
}

@tabish89
Copy link

@WickyNilliams I am having trouble implementing this really cool plug-in in an angular setting/environment. I have done the following so far and cannot for the life of me figure out what is wrong with my implementation:

  1. Added headroom.js
  2. Added angular.headroom.js
  3. Added reference to index.html
  <script src="/js/libraries/angular.headroom.js"></script>
  <script src="/js/libraries/headroom.js"></script>
  1. Added requirement to angularJS module
angular.module('PSApp', [
  'fcsa-number',
  'headroom',
  'typer',...
])
  1. Added some basic CSS
.headroom {
    will-change: transform;
    transition: transform 200ms linear;
}

.headroom--pinned {
    transform: translateY(0%);
}

.headroom--unpinned {
    transform: translateY(-100%);
}

What am I doing wrong? It just doesn't want to work... activate. I scroll up/down and nothing happens...

@WickyNilliams
Copy link
Owner

Closing in favour of #333, which will look at all angular issues

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

No branches or pull requests

3 participants