Enyo 2.7: how to go about for navigation

Hi All,

Im having problem implementing the navigation in 2.7
basically im trying to centralized a class to manage navigation. Simple pushPage and popPage.

Right now im assuming we can swap pages using simple new PageName().renderInto(body)

I call this Navigation Class.

So, I wrote a class which managed the pushPage which push the instance of PageName to an array then render it into body. and PopPage retrieve the last index of the array and render into body.

I got into trouble when, the pages got abit more complicated. Almost every page will require ("Navigation");

I noticed the builder (enyo-dev) doesnt allow me to use the same module name in require(filename). E.g. Navigation class has all the require of pages needed to travel to all app pages. If Navigation is required into any of the my Pages an error will occur coz Navigation has the same require reference to itself. How do I go about in designing the navigation then?

Sign In or Register to comment.