poteto/ember-crumbly — dự án mã nguồn mở — đang có 170 sao GitHub. Declarative breadcrumb navigation for Ember apps
Tóm tắt dựng từ metadata GitHub của chính dự án — chưa có bài review TopGit. Trang sẽ tự động cập nhật khi bài review đầy đủ được xuất bản.
VÌ SAO CHƯA CÓ REVIEW
TopGit viết bài đầy đủ cho repo có nhiều sao nhất và được yêu cầu nhiều nhất. Trang này là snapshot trong thời gian chờ — xem README gốc ở tab READ ME.
⚠️ This addon is no longer maintained, please look for an alternative.
Adds a Component to your app that displays the current route hierarchy (commonly known as breadcrumb navigation). Thanks to @rwjblue for providing the excellent addon name.
This addon provides a very declarative way to generate dynamic breadcrumbs.
$ ember install ember-crumbly
Compatibility
This addon is tested against the release, beta and canary channels, and explicitly tested against all versions beginning from ~1.11.x and up.
Usage
Basic usage
Basic usage is simple, just add the Component to any template in your application:
This will automatically output the current route's hierarchy as a clickable breadcrumb in a HTML structure that Bootstrap or Foundation expects. By default, the Component will simply display the route's inferred name.
For example, the route foo/bar/baz/1 will generate the following breadcrumb: Foo > Bar > Baz > Show. In most cases, this won't be exactly how you'd like it, so you can use the following declarative API to update the breadcrumb labels:
In this case, if the name property of model is modified, the breadcrumb will be updated automatically.
Advanced usage
You can also pass in arbitrary properties to the breadCrumb POJO inside your route, and then pass in a custom template to the Component's block to render it the way you'd like:
Will generate the following breadcrumb: Animals > Quadrupeds > Cows > Mary (5) says Moo!
Choosing routes to display
By default, all routes are displayed in the breadcrumb. To have certain routes opt-out of this, simply set breadCrumb to null inside that particular route.
Will generate the following breadcrumb: Animals > Cows > Mary (5) says Moo!
Explicitly setting linkable routes
The Component's linkable attr applies to all routes by default. You can also explicitly set this on specific routes, by adding linkable: {true,false} to the breadCrumb POJO in your route.
// foo/bar/baz/show/route.js
export default Ember.Route.extend({
breadCrumb: {
title: 'Cows with a drinking addiction',
linkable: false
}
});
In certain scenarios, you might want to reverse the order of the breadcrumb (i.e. from RTL instead of LTR). To enable this, just set the reverse attr on the Component in your template:
{{bread-crumbs linkable=true reverse=true}}
Will generate the following breadcrumb: Mary < Cows < Quadrupeds < Animals. Note that you have to style this yourself (the Component is not responsible for generating the separators).
Installation
git clone <repository-url>
cd my-addon
yarn
Linting
yarn lint:js
yarn lint:js -- --fix
Running tests
ember test – Runs the test suite on the current Ember version
ember test --server – Runs the test suite in "watch mode"
ember try:each – Runs the test suite against multiple Ember versions
poteto/ember-crumbly có 170 sao GitHub — tải lại trang để xem số mới nhất, hoặc xem trực tiếp github.com/poteto/ember-crumbly. TopGit phản chiếu số sao của GitHub nhưng không cam kết đến từng phút.
poteto/ember-crumbly có tag gì không?
Bản đồng bộ chưa ghi nhận topic GitHub nào cho poteto/ember-crumbly. GitHub topics hiển thị ở thanh bên phải trang repo — đó là nơi đáng kiểm tra nhất.
poteto/ember-crumbly còn đang phát triển không?
Commit gần nhất trên poteto/ember-crumbly là 4.8 năm trước (theo timestamp GitHub). Repo có 78 fork — một chỉ báo về mức độ quan tâm của cộng đồng.
poteto/ember-crumbly là gì?
poteto/ember-crumbly (poteto/ember-crumbly) là dự án JavaScript trên GitHub. Theo mô tả gốc: Declarative breadcrumb navigation for Ember apps
poteto/ember-crumbly viết bằng ngôn ngữ gì?
poteto/ember-crumbly chủ yếu viết bằng JavaScript. Trường "language" của GitHub dựa trên phần lớn byte ở nhánh mặc định.
Đọc đầy đủ README ở tab phía trên.
ember-crumbly có đáng để bạn bỏ thời gian?
ChatGPT, Claude và Perplexity đều đọc được trang này. Hỏi thử xem họ nghĩ gì về ember-crumbly.