dapperdandev
dapperdandev

Reputation: 3306

AngularJS 1.7 - templateUrl displays url in view instead of the template

Summary

I'm trying to convert my angularjs components/directives over to TypeScript. Unfortunately, the templateUrl property doesn't display the template that's passed to it. Instead, it literally displays a partial path the template.

Code

class JumpPagerController {
...
    }
}

JumpPagerController.$inject = ['$timeout'];
export const jumpPagerComponent = {
    templateUrl: './jump-pager.component.html',
    controller: JumpPagerController,
    bindings: {
        pagerPlaceholder: '@?',
        pagerCurrentPage: '=',
        pagerItemsPerPage: '=',
        pagerTotalItems: '=',
        pagerChange: '&'
    }
};

Expected

enter image description here

Actual

enter image description here

What I've Tried

Recap

So you can see that I'm at a loss. What is the correct way to use templateUrl on an angularjs component using typescript and webpack?

Upvotes: 0

Views: 341

Answers (0)

Related Questions