I have file with this component with remote URL:
@Component({
templateUrl: '/mobilesiteapp/template/?path=pages/tabs'
})
export class TabsPage {
}
And my compiler gave me:
[13:28:50] Error reading template file, "/mobilesiteapp/template/?path=pages/tabs": Error: ENOENT: no such file or directory, open 'D:\denwerready\-readyscript
\modules\mobilesiteapp\appsourse\src\pages\mobilesiteapp\template\?path=pages/tabs'
I don't need this check because I need to get templates from url.
How to fix it? Do anybody know?
What is your usecase?
Using remote templates is not possible, you have to have a local copy of the template to have Angular 2 compiler work correctly.
Optionally, you could use ComponentFactoryResolver and inject a template/component dynamically from your controller.
https://blog.thecodecampus.de/angular-2-dynamically-render-components/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With