@legtech/url
v2.0.0
Published
Functions to help resolve urls in javascript when working in MVC
Downloads
13
Keywords
Readme
Functions to help resolve urls in javascript when working in MVC
To use, put the following in your layout:
<script type="text/javascript">
$(document).ready(function(event, data) {
WSL.Url.setRelativeRoot('@Url.Content("~/")');
});
</script>
Then, in js you can resolve urls as follows:
WSL.Url.resolve("~/Controller/Action");