2.0.1 • Published 4 years ago

ui-router-breadcrumbs v2.0.1

Weekly downloads
70
License
MIT
Repository
github
Last release
4 years ago

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 git@github.com: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);
2.0.1

4 years ago

2.0.0

5 years ago

1.2.4

6 years ago

1.2.3

6 years ago

1.2.2

6 years ago

1.2.1

6 years ago

1.2.0

7 years ago

1.1.6

7 years ago

1.1.5

7 years ago

1.1.4

7 years ago

1.1.3

7 years ago

1.1.2

7 years ago

1.1.1

7 years ago

1.1.0

7 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago