I am sure this is a dupe, but I can't find the correct answer. It's simple enough. On a view in my application (that is within an Area if that matters) I need to get the url for a webapi controller in the root of my project (/api/settingscontroller).
How do I get this url in the view (via razor) so I can pass it into a javascript knockout view model?
Right now I have this:
ko.applyBindings(new UserSettingsViewModel('api/settings/', userId));
with appends that url to the location I am at. I want this:
locahost:1234/api/settings/
but I am getting this:
localhost:1234/settings/api/settings/
the first 'settings' in the url is the area that I am in.