P.S. I am using html5Mode to remove '#' in routing in below scenario Removing the fragment identifier from AngularJS urls (# symbol)
Consider I have two main pages.One is photos where thumbnails are provided and whose url is /someSlug/photos
. Other is the url of a single photo '/someSlug/photos/somePhotoId' which shows a bigger view of a particular photo.
My problem is to show the /someSlug/photos/somePhotoId
page in modal when user clicked on somePhoto thumbnail in photos page (and yes the url should change to /someSlug/photos/somePhotoId
). But if user access it directly like this /someSlug/photos/somePhotoId
single photo page should come. I am able to include the single photo template into my modal but facing issues with routing. Not able to change the url while opening the modal to /someSlug/photos/somePhotoId because it opens up new page.
I have two modules for this:
A-> Used and handles routes of photos page
B-> used and handle routes of single photo
Since B single photo template is used in 'A', I have put dependency of 'B' into 'A'. So whenever I try to change the url to /someSlug/photos/somePhotoId while in modal. B's routing overrides the job and open the page. Best example for this is facebook photos. Tried to create a fiddle but its not giving me routing access. Just have a look on facebook photos URL and you will come to know about it. If you needs more inputs, please let me know :)
I am very new to angularJS (Basics->Advanced Stage). Any help would be highly appreciated.