0
votes

I have built an ember application which has two routes say route1 and route2.

I got the compiled files from dist folder. I put those files in a tomcat server.

When i try to access that file through index.html, it works fine. But how can i navigate to a route in that compiled application?

Normally in ember-cli development environment, we navigation to a route using server:port/route_name

How can i perform the same operation in index.html without using any hyperlinks for routes?

Edit:

Got the answer. Setting ENV.locationType = 'hash' solved the navigation problem. I was able to access the route using index.html#/route_name

But I am still stuck with how to integrate ember app into a non-ember app.

1
How can I insert a particular route in a jsp page? - radcliff

1 Answers

0
votes

Got the answer.

Setting ENV.locationType = 'hash' solved the navigation problem. I was able to access the route using index.html#/route_name

Setting ENV.APP.rootElement = '#ember-testing' solved inserting ember app into non-ember app. Create a div with the rootElement ID and then ember will automatically place the app inside the div.