Giter Site home page Giter Site logo

sibiraj-s / ui-router-breadcrumbs Goto Github PK

View Code? Open in Web Editor NEW
2.0 4.0 0.0 2.21 MB

๐Ÿž Breadcrumbs for AngularJS pages using angular-ui-router

Home Page: https://sibiraj-s.github.io/ui-router-breadcrumbs/

License: MIT License

CoffeeScript 47.72% JavaScript 45.61% SCSS 5.29% Shell 1.38%
angularjs ui-router breadcrumbs ui-router-breadcrumbs

ui-router-breadcrumbs's Introduction

ui-router-breadcrumbs Tests

This is a simple directive that creates breadcrumbs on the fly for AngularJs pages using angular-ui-router

live demo here

Getting Started

Installation

You can directly clone/download here

git clone [email protected]:sibiraj-s/ui-router-breadcrumbs.git

or use cdn

Minified
//cdn.jsdelivr.net/npm/ui-router-breadcrumbs@latest/ui-router-breadcrumbs.min.js
//cdn.jsdelivr.net/npm/ui-router-breadcrumbs@latest/ui-router-breadcrumbs.min.css
Pretty Printed
//cdn.jsdelivr.net/npm/ui-router-breadcrumbs@latest/ui-router-breadcrumbs.js
//cdn.jsdelivr.net/npm/ui-router-breadcrumbs@latest/ui-router-breadcrumbs.css

or

Install via Package managers such as npm or yarn

npm install ui-router-breadcrumbs --save
# or
yarn add ui-router-breadcrumbs

Usage

Import the modules required for ui-router-breadcrumbs.

<-- styles -->
<link rel="stylesheet" href="ui-router-breadcrumbs.min.css" />

<-- scripts -->
<script src="angular.min.js"></script>
<script src="angular-ui-router.min.js"></script>
<script src="ui-router-breadcrumbs.min.js"></script>

add uiBreadcrumbs dependency to the module

angular.module('myApp', ['uiBreadcrumbs']);

in routes config

$stateProvider.state('app.home', {
  url: '/home',
  data: {
    label: 'Home' //label to show in breadcrumbs
  },
  templateUrl: 'templates/home.html'
});

and in your html

<ui-breadcrumb></ui-breadcrumb>

Options

you can specify to show or hide abstract states

const config = breadcrumbProvider => {
  breadcrumbProvider.configure({
    abstract: true
  });
};

config.$inject = ['breadcrumbProvider'];
app.config(config);

ui-router-breadcrumbs's People

Contributors

dependabot[bot] avatar sibiraj-s avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.