2

I want to load HTML from an ASP.NET MVC 4 action. So full URL looks like:

http://localhost:7588/en/Dialogs/AclManager

Here is how I declare dependency:

define(['jquery', 'text!AclManager'], function...

Here is my require.config excerpt:

require.config({ paths: { 'AclManager' : '/en/Dialog/AclManager' }});

With this configuration text plugin doesn't find extension and tries to load: /scripts/.AclManager

if I declare dependency as AclManager. (notice dot), then require goes to `/en/Dialogs/AclManager.' which is almost right, except that dot at the end.

I could declare dependency as AclManager/. and this works because my server will ignore trailing /, but I would rather not have a trailing slash there.

What would be an easy way to point text to the URL I need?

THX-1138
  • 21,316
  • 26
  • 96
  • 160
  • I don't think you should put mvc action urls into the require.js config, it's only meant for libs, modules and plugins. That's how I understand it. – Legends Jan 13 '17 at 21:11

0 Answers0