AngularJS [SOLVED]: AngularJS cannot find template

AngularJS [SOLVED]: AngularJS cannot find template

Home Forums Frameworks AngularJS tutorials AngularJS [SOLVED]: AngularJS cannot find template

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #246231

    Cloudy Point
    Keymaster

    QuestionQuestion

    Here is my directive

    (function() {
        angular.module('commentsDirective', [])
    
        .directive('mngComments', mngComments)
    
        function mngComments() {
            return {
                restrict: 'AE',
                scope: {
                    moment: '='
                },
                templateUrl: 'comments.html',
                replace: true,
                controller: 'CommentsController',
                controllerAs: 'vm'
            };
        };
    })();
    

    Here is my file structure:

    enter image description here

    And I get this error message:

    enter image description here

    I’m not understanding this. My html file is in the same directory as my directive so why can’t it find it?

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.