angularjs - Nativescript angular Cannot move app.component.html in to separte folder -


i using nativescript 2.3.0 angular. created starter project following command

tns create projname --ng

i have following folder structure

├── app │   ├── app.css │   ├── app.component.html │   ├── app.component.ts │   ├── main.ts 

in side main.ts file have following.

import { platformnativescriptdynamic, nativescriptmodule } "nativescript-angular/platform"; import { ngmodule } "@angular/core"; import { appcomponent } "./app.component"; @ngmodule({     declarations: [appcomponent],     bootstrap: [appcomponent],     imports: [nativescriptmodule] }) class appcomponentmodule {}  platformnativescriptdynamic().bootstrapmodule(appcomponentmodule); 

notice importing appcomponent on line 3

what want want organize code have app.component file in separate folder

as shown below

│   ├── pages │   │   └── app.component.ts │   │   └── app.component.html │   ├── app.css │   ├── main.ts 

i have changed import in main.ts file follows

import { appcomponent } "./pages/app.component"; 

moving file app.component.html file give following error.

unhandled exception com.tns.nativescriptexception: calling js method oncreateview failed 


Comments

Popular posts from this blog

php - How to display all orders for a single product showing the most recent first? Woocommerce -

asp.net - How to correctly use QUERY_STRING in ISAPI rewrite? -

angularjs - How restrict admin panel using in backend laravel and admin panel on angular? -