Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
frank_packer_at
Partner - Contributor III
Partner - Contributor III

RequireJS appending 'js' extension when loading resources

Hi All,

I've built an AngularJS extension and it's working great on my local version of Sense. However when deploying it to the server, RequireJS will not load the css file and the html template. It's appending a .js extension when loading the files and failing.

Server is on June 2019 

Console error message:

console_error.jpg

 

Code for loading files. The files are that are erroring are declared as text as per RequireJS syntax.

code.jpg

Is there something I'm missing, here? The only obvious difference is that my local version of Sense is a more recent version than June 19. This doesn't feel like a version issue, however, unless it's a known bug in June 19? Upgrading the server isn't an option at this point.

Labels (5)
3 Replies
frank_packer_at
Partner - Contributor III
Partner - Contributor III
Author

Bump. Anyone?

hacr
Creator
Creator

I think I found a work around and actually able to load my things now. I used this information

https://jaketrent.com/post/cross-domain-requirejs-text/ 

and used the full URL  define( ["qlik", "text!https://...../template.html"],

ajeesh555
Contributor
Contributor

Can you please explain little more this. How can we pass a URL to that method since the URLs are dynamic?