All Projects → ng-milk → angular-sticky-navigation-directive

ng-milk / angular-sticky-navigation-directive

Licence: MIT license
Angular directive to make a sticky element, quick demo here: http://ng-milk.github.io/angular-sticky-navigation-directive/

Programming Languages

HTML
75241 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to angular-sticky-navigation-directive

Eeh Navigation
An AngularJS menu module.
Stars: ✭ 74 (+270%)
Mutual labels:  angularjs, navigation
PhotoFeed
🛵 Instagram in Swift 4
Stars: ✭ 43 (+115%)
Mutual labels:  navigation
UT Framework
Various advanced tools built for Unreal Engine 4
Stars: ✭ 45 (+125%)
Mutual labels:  navigation
fastgtfs
A pure Rust library that provides GTFS parsing, navigation, time table creation, and real-time network simulation.
Stars: ✭ 21 (+5%)
Mutual labels:  navigation
graphhopper-ios
iOS Port of the GraphHopper road routing engine
Stars: ✭ 67 (+235%)
Mutual labels:  navigation
navigator
🧿 Build navigation or menu for Laravel and Awes.io. Unlimited complexity and depth, with permissions and sorting support.
Stars: ✭ 47 (+135%)
Mutual labels:  navigation
angular
Repository for my tutorial course: Learning AngularJS on LinkedIn Learning and Lynda.com. http://raybo.org/angular
Stars: ✭ 79 (+295%)
Mutual labels:  angularjs
router
Keep your Angular2+ router state in Redux
Stars: ✭ 28 (+40%)
Mutual labels:  angularjs
flutter redux navigation
Navigation Middleware for Flutter's redux library.
Stars: ✭ 43 (+115%)
Mutual labels:  navigation
active admin-subnav
Enhanced sub-navigation for nested ActiveAdmin resources
Stars: ✭ 20 (+0%)
Mutual labels:  navigation
ccms-components
数云PC angular1.x 组件库 (不再维护更新)
Stars: ✭ 51 (+155%)
Mutual labels:  angularjs
shortcut
Quickly make and use shortcuts in your shell for easy navigation
Stars: ✭ 17 (-15%)
Mutual labels:  navigation
angularjs-es6-starter-kit
Basic AngularJS, ES6, Webpack Starter Kit Project which includes Bootstrap 4 also. This is a boilerplate for AngularJS SPA with Bootstrap 4.
Stars: ✭ 28 (+40%)
Mutual labels:  angularjs
keycloak-spring-boot-rest-angular-demo
Demo for configuring Keycloak authentication for a spring-boot rest service and AngularJs web client
Stars: ✭ 24 (+20%)
Mutual labels:  angularjs
IoT-Modelling-Tool
IoT Modelling Tool is a platform which allows users to have their own devices and components modeled in order to represent and manage a physical environment.
Stars: ✭ 16 (-20%)
Mutual labels:  angularjs
NavigationRouter
A router implementation designed for complex modular apps, written in Swift
Stars: ✭ 89 (+345%)
Mutual labels:  navigation
leaflet-layer-tree-plugin
No description or website provided.
Stars: ✭ 31 (+55%)
Mutual labels:  navigation
navigator.lua
Source code analysis & navigation plugin for Neovim. Navigate codes like a breeze🎐. Exploring LSP and 🌲Treesitter symbols a piece of 🍰. Take control like a boss 🦍.
Stars: ✭ 781 (+3805%)
Mutual labels:  navigation
ypereirareis.github.io
DevOps, Symfony and VueJs developer. Articles and experiences on docker, grafana, prometheus, RabbitMQ, PHP, MySQL, Admin, Nginx, Haproxy, SSH,...
Stars: ✭ 15 (-25%)
Mutual labels:  angularjs
gravitee-management-webui
Gravitee.io - API Management - Management UI
Stars: ✭ 107 (+435%)
Mutual labels:  angularjs

Angular sticky navigation directive

Angular sticky navigation directive demo

Quick Demo

Angular directive to make a sticky element, read about it on here. It will add a ng-sticky-fixed class whenever your navigation is not visible on the viewport (therefore it will make it visible & sticky). It's up to you to style the class properly, see the example for more.

Usage

  1. Include ng-sticky.js.
  2. Add dm.stickyNav as a dependency to your app.
  3. Profit!

Bower

Installable via bower:

bower install ng-sticky

Example

See index.html for an example.

<script>
  angular.module('app', ['dm.stickyNav']);
</script>

<style>
  .ng-sticky-fixed{
    background-color:rgba(0, 0, 0, 0.1);
    bottom:0;
    left:0;
    padding:10px 15px;
    position:fixed;
    top:auto;
    width:100%;
  }
</style>

<article ng-app="app">
  <section sticky-nav>
    <button class="btn btn-primary">Review</button>
    <button class="btn btn-danger">Delete</button>
  </section>

  <section>
    [...] Lots of text
  </section>
</article>

Custom sticky class

By default ng-sticky-fixed will be appended to the element's class. By providing a value to the sticky-nav attribute you can use any other class:

[...]
<style>
  .custom-class{
    /* ... */
  }
</style>

<article ng-app="app">
  <section sticky-nav="custom-class">
    [...]
  </section>
  [...]
</article>

Additional directive attributes

By default, the directive will attempt a 100 milliseconds $timeout call to wait for the DOM to load. You can provide different values for retrying until DOM is ready using max-tries and ms-retry-delay:

<div sticky-nav="custom-class" max-tries="5" ms-retry-delay="200"/>

When you don't want to use the height of your sticky element as part of the threshold for applying the sticky class, you can add the ignore-element-size directive attribute. It is useful for 'tall' elements like sidebars or side menus.

<div sticky-nav="custom-class" ignore-element-size/>

About ngmilk

ngmilk is the place to go for fresh front-end articles, with a focus on AngularJS. See more on ngmilk.rocks

Follow @ngmilkrocks on Twitter to stay ahead of the game.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].