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

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

jsf - "PropertyNotWritableException: Illegal Syntax for Set Operation" error when setting value in bean -

laravel - Undefined property: Illuminate\Pagination\LengthAwarePaginator::$id (View: F:\project\resources\views\admin\carousels\index.blade.php) -