user355289
user355289

Reputation: 1170

hosting an angular 2 app in an application under localhost

I'm a beginner an angular2 and started working on a project based on examples I found. When hosting my app on windows it accessible at http:/localhost (or with npm http://localhost:3000) but if I try put it on IIS under localhost/MyApp is still tries to navigate under localhost.

you can find sample code I used at: https://github.com/DeborahK/Angular2-GettingStarted/tree/master/APM%20-%20Final

is there any easy way of doing this?enter image description here

Upvotes: 0

Views: 606

Answers (1)

Timathon
Timathon

Reputation: 1049

Try this: in your index.html of angular 2 app, edit <base href="/MyApp/">.

Upvotes: 2

Related Questions