Skip to content

NativeScriptRouter Lazy Loading not working if component has hyphen "-" in name of component #1739

Open
@abcfoundry

Description

@abcfoundry

Environment
"@angular/animations": "~7.1.0",
"@angular/common": "~7.1.0",
"@angular/compiler": "~7.1.0",
"@angular/core": "~7.1.0",
"@angular/forms": "~7.1.0",
"@angular/http": "~7.1.0",
"@angular/platform-browser": "~7.1.0",
"@angular/platform-browser-dynamic": "~7.1.0",
"@angular/router": "~7.1.0",
"core-js": "^2.5.4",
"nativescript-angular": "~7.1.0",
"nativescript-theme-core": "~1.0.4",
"reflect-metadata": "~0.1.8",
"rxjs": "~6.3.3",
"tns-core-modules": "~5.1.1",
"zone.js": "^0.8.26"

Describe the bug

** Call Lazy Loaded module **


{
path: 'main,
loadChildren: './main/main/main.module#MainModule'
},

Broken Route file


import { MainComponent } from '../main/main-main.component'; // notice the hyphen
const routes: Routes = [
{
path: '',
component: MainMainComponent
}


Working Route file


import { MainComponent } from '../main/main.component';
const routes: Routes = [
{
path: '',
component: MainComponent
}


Expected behavior

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions