Giter Site home page Giter Site logo

Comments (5)

dguettler avatar dguettler commented on August 29, 2024

What are the issues you're seeing when trying to use it in combination with routable engines?

from ember-crumbly.

mrkirchner avatar mrkirchner commented on August 29, 2024

What i am seeing is the following error

Assertion Failed: [ember-crumbly] Could not find a current route Error at assert (http://localhost:4200/assets/vendor.js:20974:13) at assert (http://localhost:4200/assets/vendor.js:32725:34) at Class.get (http://localhost:4200/engines-dist/authoring/assets/engine-vendor.js:5072:9) at ComputedPropertyPrototype.get (http://localhost:4200/assets/vendor.js:32381:28) at Object.get (http://localhost:4200/assets/vendor.js:37374:19) at RootPropertyReference.compute (http://localhost:4200/assets/vendor.js:30337:26) at RootPropertyReference.value (http://localhost:4200/assets/vendor.js:30204:45) at ArrayIterable.iterate (http://localhost:4200/assets/vendor.js:29960:26) at IterationArtifacts.isEmpty (http://localhost:4200/assets/vendor.js:59895:58) at IterablePresenceReference.value (http://localhost:4200/assets/vendor.js:64296:36)

Ill try to dig a bit more to get some more information.

from ember-crumbly.

mrkirchner avatar mrkirchner commented on August 29, 2024

Looks like in bread-crumbs.js

currentRouteName: readOnly('applicationRoute.controller.currentRouteName'),

currentRouteName is undefined since controller is pretty much empty. This described case is where I have put crumbly inside a component within my Ember Engine.

If i try to move the breadcrumb to the parent applications i get:

[ember-crumbly] route:authoring was not found Error at assert (http://localhost:4200/assets/vendor.js:20974:13) at assert (http://localhost:4200/assets/vendor.js:32725:34) at http://localhost:4200/engines-dist/authoring/assets/engine-vendor.js:5134:9 at Array.map (native) at Class._lookupBreadCrumb (http://localhost:4200/engines-dist/authoring/assets/engine-vendor.js:5126:44) at Class.get (http://localhost:4200/engines-dist/authoring/assets/engine-vendor.js:5076:27) at ComputedPropertyPrototype.get (http://localhost:4200/assets/vendor.js:32381:28) at Object.get (http://localhost:4200/assets/vendor.js:37374:19) at RootPropertyReference.compute (http://localhost:4200/assets/vendor.js:30337:26) at RootPropertyReference.value (http://localhost:4200/assets/vendor.js:30204:45)

Hopefully that give you enough info to try to fix it. If you need me to do anything let me know.
@dguettler

from ember-crumbly.

ascudder avatar ascudder commented on August 29, 2024

I encountered this same problem with one of our projects, so think I found where this issue is coming from.

In the _lookupRoute function in the bread-crumbs component, the getOwner(this) function can only look up the routes that exist in the parent application. So, when it encounters a route that is inside of a routable engine, _lookupRoute returns undefined because it can't find the route because the route is owned by the engine, not the parent application that's hosting the engine.

After looking at how Ember Engines modified the internal router service for Ember, I believe that using the routing service and the getHandler(routeName) function will allow the route object to get looked up whether the route belongs to the parent app or an engine. I'm starting to work on a PR now that will hopefully help resolve this.

from ember-crumbly.

GCheung55 avatar GCheung55 commented on August 29, 2024

@dguettler with #143 merged, what are the next steps to publishing a new version to NPM?

from ember-crumbly.

Related Issues (20)

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.