0

I have a few custom property editors which all work like a charm on my development environment. When I monitor the network trafic (chrome developertools) the javascript files are downloaded seperatly and I can find them in the resources tab.

However, when I publish the property editors to azure websites the behaviour is different. Some of the property editors work fine, others don't. Angular is complaining about controllers not being available (undefined).

I can't see the javascript files being downloaded seperatly. However, the umbraco dependencyhandler does download some of the scripts in a bundle. There I can see some angular controllers are being created. As a result I can't see the javascript files (angular controllers, services...) in the resource tab of chrome developertools.

Any help? Thanks.

With regards.

1 Answers1

0

I guess that when you publish, your web.config is in "release mode" (aka debug=false). In this way ClientDependency will minify and bundle your scripts and maybe some minification error happens...

To see if this suggestion could be right, modify your web.config in debug mode and see if all works fine. If so you have to fix your script to avoid minification errors

wilver
  • 2,106
  • 1
  • 19
  • 26
  • I got the same issue. When I tried setting debug="true", controller file was getting loaded, but two json files which I had loaded using assertService was not getting loaded. That's why the code inside the .then() block is not getting executed. Can anybody help me out what may be the reason. I have already checked the path, clearing cache, app restart. – Swastik Jul 04 '19 at 10:32