Security News
New Python Packaging Proposal Aims to Solve Phantom Dependency Problem with SBOMs
PEP 770 proposes adding SBOM support to Python packages to improve transparency and catch hidden non-Python dependencies that security tools often miss.
@bagaar/ember-breadcrumbs
Advanced tools
Template based breadcrumb management for Ember applications.
Template based breadcrumb management for Ember applications.
ember install @bagaar/ember-breadcrumbs
{{! app/templates/application.hbs }}
<BreadcrumbsContainer
@itemClass="breadcrumbs__item"
@linkClass="breadcrumbs__link"
class="breadcrumbs"
/>
NOTE: It's also possible to render multiple instances of the
<BreadcrumbsContainer />
component.
{{! app/templates/foo.hbs }}
<BreadcrumbsItem as |linkClass|>
<LinkTo @route="foo" class={{linkClass}}>
Foo
</LinkTo>
</BreadcrumbsItem>
{{! app/templates/foo/bar.hbs }}
<BreadcrumbsItem as |linkClass|>
<LinkTo @route="foo.bar" class={{linkClass}}>
Bar
</LinkTo>
</BreadcrumbsItem>
NOTE: The
<BreadcrumbsItem />
component is responsible for rendering the provided<LinkTo />
component into all instances of the<BreadcrumbsContainer />
component using Ember's{{in-element}}
helper.
Leaving behind breadcrumbs like this might seem very verbose, but it's actually pretty flexible and has some advantages:
<LinkTo />
component to define breadcrumb links, you have complete control over:
The rendered output will be:
<ul class="breadcrumbs">
<li class="breadcrumbs__item">
<a class="breadcrumbs__link" href="/foo">Foo</a>
</li>
<li class="breadcrumbs__item">
<a class="breadcrumbs__link" href="/foo/bar">Bar</a>
</li>
</ul>
The addon doesn't ship with default styling, this should be done inside the consuming project.
<BreadcrumbsContainer />
argumentsName | Description | Type |
---|---|---|
itemClass | The class that will be added to all <BreadcrumbsItem /> components | String |
linkClass | The class that will be yielded to the <BreadcrumbsItem /> 's block content | String |
@bagaar/ember-breadcrumbs
to Your Engine's dependencies
This will make all @bagaar/ember-breadcrumbs
components available inside the engine.
{
"dependencies": {
"@bagaar/ember-breadcrumbs": "*"
}
}
breadcrumbs
Service Available Inside the EngineThis will make sure that the same instance of the breadcrumbs
service is used inside the engine and inside the host application.
// app/app.js
export default class App extends Application {
engines = {
'engine-name': {
dependencies: {
services: ['breadcrumbs'],
},
},
};
}
// lib/engine-name/addon/engine.js
export default class EngineName extends Engine {
dependencies = {
services: ['breadcrumbs'],
};
}
That's it! Now you should be able to leave behind breadcrumbs inside the engine and render them inside the host application.
See the Contributing guide for details.
This project is licensed under the MIT License.
FAQs
Template based breadcrumb management for Ember applications.
We found that @bagaar/ember-breadcrumbs demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
PEP 770 proposes adding SBOM support to Python packages to improve transparency and catch hidden non-Python dependencies that security tools often miss.
Security News
Socket CEO Feross Aboukhadijeh discusses open source security challenges, including zero-day attacks and supply chain risks, on the Cyber Security Council podcast.
Security News
Research
Socket researchers uncover how threat actors weaponize Out-of-Band Application Security Testing (OAST) techniques across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.