Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • J 447 posts 864 karma points
    Jun 03, 2023 @ 11:18
    J
    0

    Where are the angular.js files for Umbraco 11?

    I was moving some of the HTML/Angular.js views from Umbraco 8 and trying to add them to a test Umbraco 11 project but when i run the custom section and click the menu item i receive an error.

    Digging into the error i have the below listed

    Could not load content for https://localhost:12345/umbraco/lib/angular/angular.js (HTTP error: status code 404, net::ERRHTTPRESPONSECODEFAILURE)

    I looked into the project directory and that path doesnt exist. As a matter of fact the Umbraco folder doesnt have any files under (well i see two which is Data and Logs).

    Where or how could i reference the angular.js file? As far as i can tell Umbraco 11 still uses Angular for backoffice templates and MVC/Core Views are not supported?

  • rocky 4 posts 73 karma points
    Jun 05, 2023 @ 07:05
    rocky
    0

    Hello I am also want to know about angular.js files.

  • Huw Reddick 1929 posts 6717 karma points MVP 2x c-trib
    Jun 05, 2023 @ 09:53
    Huw Reddick
    0

    Hi J,

    When your developing (i.e. in VS) the umbraco files are served directly from the Umbraco dll's, however when you do a publish the files will be extracted to the umbraco folder.

    The angular.js would be referred too from

    /umbraco/lib/angular/angular.min.js
    
  • Umbracoraco 23 posts 153 karma points
    Jun 19, 2023 @ 06:31
    Umbracoraco
    0

    Hello! How do I change the path?

  • Vasyl Kurtyanik 6 posts 26 karma points
    Jul 10, 2023 @ 14:47
    Vasyl Kurtyanik
    0

    have you found solution ?

  • Huw Reddick 1929 posts 6717 karma points MVP 2x c-trib
    Jul 10, 2023 @ 14:52
    Huw Reddick
    0

    Hi Vasyl,

    Solution to what exactly?

    The angular js should be refered to via

    /umbraco/lib/angular/angular.min.js
    

    However during development you will not see this folder as it is served from the umbraco dll's

  • Vasyl Kurtyanik 6 posts 26 karma points
    Jul 10, 2023 @ 19:11
    Vasyl Kurtyanik
    0

    Hi Huw, "Could not load content for https://localhost:44362/umbraco/lib/angular/angular.js (HTTP error: status code 404, net::ERRHTTPRESPONSECODEFAILURE)" - I have this locally on iis express. Could I resolve it ?

  • Huw Reddick 1929 posts 6717 karma points MVP 2x c-trib
    Jul 10, 2023 @ 20:12
    Huw Reddick
    0

    It is angular.min.js

  • Vasyl Kurtyanik 6 posts 26 karma points
    Jul 11, 2023 @ 08:31
    Vasyl Kurtyanik
    0

    But it is not load file when I run it on iis express. I got error in console

  • Huw Reddick 1929 posts 6717 karma points MVP 2x c-trib
    Jul 12, 2023 @ 06:41
    Huw Reddick
    0

    What error do you get in the console?

  • john blair 48 posts 219 karma points
    Aug 30, 2023 @ 12:37
    john blair
    0

    I have similar issue in Umbraco 11. I have found that in IIS express any explicit reference to a js file in my master.cshtml razor template file needs to be located in the "CONTENT ROOT" directory above the wwwroot directory. Note: Smidge bundling takes js and css files from the wwwroot directory when referenced in the same razor template file . This is so inconsistent for development. Note: Change the html script src location from "/" to "~/" makes no difference. The 404 in development is only resolved when the file is placed in the "CONTENT ROOT" which is the directory above wwwroot and the folder of the umbraco application.

    Please advise if you have found a way of referencing an explicit js file in a razor file that resolves to the wwwroot directory when developed in Visual Studio using default IIS Express web server.

     <script src="~/scripts/distribution/googleTagManager.js"></script>
    
Please Sign in or register to post replies

Write your reply to:

Draft