What does --routing-scope stands for in Angular CLI
After some digging, I found this: schema.json, the schema.json for the CLI. Lots of good stuff in this.
According to this, the valid values for --routing-scope
are either Child
, or Root
. Casing matters. The default is Child
.
An odd thing is, the code that gets generated looks exactly the same no matter what value I use. They both look like what is below after running ng g m testing --routing-scope Child
or ng g m testing --routing-scope Root
import { NgModule } from '@angular/core';import { CommonModule } from '@angular/common';@NgModule({ imports: [ CommonModule ], declarations: []})export class TestingModule { }
Further digging shows that the value is used when code is generated to build the forRoot
or forChild
function in module imports
.