samturrell / vue-breadcrumbs

Breadcrumbs for Vue.js
MIT License
146 stars 27 forks source link

Added option to disable global component #18

Closed HermannBjorgvin closed 5 years ago

HermannBjorgvin commented 5 years ago

This commit makes the global breadcrumbs component optional by setting options.skipComponent to true.

Due to the extensive nature of what I am doing I feel more comfortable creating my own component and working solely with this.$breadcrumbs. Having a globally namespaced component that I don't use is not ideal for me personally.

Example:

Vue.use(VueBreadcrumbs, {
  skipComponent: true
});

I did not build the dist files for this pull request or bump the version number.

samturrell commented 5 years ago

Hi @HermannBjorgvin - Great idea!

Would it be possible to invert the option so that it's more of an opt-out so the option would be something like registerComponent: false, which defaults to true.

HermannBjorgvin commented 5 years ago

Hello @samturrell I've changed the options property to registerComponent. I've also been testing this change in my code with no negative effects.

Thanks for the package!