Polymer 1.0 routing issue

63 views
Skip to first unread message

Abhijatya Singh

unread,
Apr 2, 2016, 9:44:44 AM4/2/16
to Polymer

I cloned polymer starter kit 1.0 and its working perfectly fine the url is : localhost:8080. When I tried with Eclipse and Apache Tomcat 8.0 to build a Java MVC application then URL changes to  : localhost:8080/project-name.

Now the behaviour of the page navigation changed dramatically. When I start the project the URL comes as: localhost:8080/project-name/#!/project-name

But it should come like: localhost:8080/project-name and should show home page and on clicking on users or contact tab the url should be :

  • localhost:8080/project-name/#!/users
  • localhost:8080/project-name/#!/contact

but it is coming like:
  • localhost:8080/project-name/#!/project-name/users
  • localhost:8080/project-name/#!/project-name/contact

Finally if I click on home tab after users or control links has been clicked then instead of coming to url : 

               localhost:8080/project-name
 It redirected automatically to :
                localhost:8080


I tried to make app.baseUrl =" ";. Changed the routing.html routing for home to empty or '*'but nothing worked. Any help would be highly appreciated.

Please help me out to solve so that I can use polymer with Java Spring MVC.

Thanks.

Reply all
Reply to author
Forward
0 new messages