Angularjs templateUrl does not render properly in Flask/python3


  • Flask/Python3
  • AngularJS==1.7

i have the following project structure:

- myapp/
   - static/
      - app/
         - my-nav/
             - my-nav.component.js
             - my-nav.module.js
             - my-nav.template.js
         - app.css
         - app-module.js
         - index.html

The unsolved issue is that the rendering of the templateUrl property of the component does not work!

Show nothing and no error message in console!

Follow the below javascript component code:

'use strict';

// register navbar component, along with its associated controller and template
    component('myNav', {
    templateUrl: '/static/app/my-nav/my-nav.template.html',
    controller: function MyNavController($http) {
        var author = 'author';

What’s wrong? Which is the correct path of the templateUrl?

Many thanks at all in advance.

Source: AngularJS