Reputation: 3306
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.
class JumpPagerController {
...
}
}
JumpPagerController.$inject = ['$timeout'];
export const jumpPagerComponent = {
templateUrl: './jump-pager.component.html',
controller: JumpPagerController,
bindings: {
pagerPlaceholder: '@?',
pagerCurrentPage: '=',
pagerItemsPerPage: '=',
pagerTotalItems: '=',
pagerChange: '&'
}
};
templateUrl: `${baseUrl}/jump-pager.component.html`
templateUrl: localhost:8080/jump-pager.component.html
template: require('...')
works, but would require me to reconfigure webpack and then modify all other cases of templateUrl
in .js
files. This isn't an optionSo 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