0

I don't really know how to put this issue. I don't even know if it is really an issue, please pardon me.

I have two menu link having the same url with a query string value to differentiate what content to load

enter image description here

A: Url http://localhost:55944/#/listing.html?type=buy

B: Url http://localhost:55944/#/listing.html?type=rent

Discovery: When A is clicked the listing page loads with content of type 'buy' and if B is clicked while on the listing page, the page does not reload and content of type 'rent' is not loaded vis a vis.

Route:

 $stateProviderReference
      .state(routeName, {
          url: url,
          templateUrl: templateUrl,
          data: { pageTitle: pageTitle, layoutId: layoutId },
          controller: controller,
          resolve: {
              deps: ['$ocLazyLoad', function ($ocLazyLoad) {
                  return $ocLazyLoad.load({
                      name: name,
                      insertBefore: '#ng_load_plugins_before', // load the above css files before a LINK element with this ID. Dynamic CSS files must be loaded between core and theme css files
                      files: files
                  });
              }]
          }
      })
6
  • What does your (relevant) routing config for these routes look like? Commented Nov 28, 2016 at 12:38
  • 1
    I think you should make separate routes without any query param, http://localhost:55944/#/listing/buy and http://localhost:55944/#/listing/rent Commented Nov 28, 2016 at 12:40
  • @devqon I have added the route. I loaded it dynamically. Thanks Commented Nov 28, 2016 at 12:59
  • I meant what the url of the said routes look like, I cannot see that in this dynamic route code Commented Nov 28, 2016 at 13:00
  • you want a dynamic load of css and js files or ? routing is your issue? Commented Nov 28, 2016 at 13:02

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.