2.0.0 • Published 2 years ago
@legtech/url v2.0.0
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");