Code Monkey home page Code Monkey logo

ember-breadcrumbs's Introduction

ember-breadcrumbs

An Ember.js component for adding breadcrumbs to your app.

Installing

You can install via the bower package ember-breadcrumbs. If you're using ember-cli, you should add a line to your Brocfile.js that looks like:

app.import("vendor/ember-breadcrumbs/dist/ember-breadcrumbs.js");

Usage

To add the breadcrumbs to your app, simply throw the component into one of your templates: {{bread-crumbs}}.

Don't worry about which template. It will automatically update itself as your route changes. There are no options to provide to the component.

Controlling crumbs

To display a bread crumb, you define properties on the controller associated with a route. When that route (or a route nested underneath it) is active, the bread crumb will be displayed.

The properties are:

  • breadCrumb: The text to display. Required.
  • breadCrumbPath: The path (e.g., "post.edit") that the crumb will link to. This property is optional; the default will be the route's path.

If the breadCrumb property is not specified, then no crumb will be displayed. Note that this means, by default, no crumbs will be displayed.

Customization

ember-breadcrumbs is styled, by default, for Foundation's Breadcrumbs.

If you like, you can reopen the component and replace the layout. E.g.:

BreadCrumbs.BreadCrumbsComponent.reopen({
  tagName: "ul",
  classNames: ["fancy-crumbs"],
  layout: null,
  layoutName: "other-template"
});

License

MIT License.

ember-breadcrumbs's People

Contributors

chrisfarber avatar gavinjoyce avatar

Watchers

James Cloos 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.