You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
add a angular-cli/router-config.ts to the scaffold. This is part of the project. The content of this file should have a comment at the top to say to not touch this file, and export a CliRouteConfig (open to name suggestions).
add a README.md to the angular-cli directory to explain that this is generated code. We will use this for other things such as providers and third party libraries.
import the CliRouteConfig in the default src/app/__name__.ts. The code should look something like [1].
ng generate route needs to add the route info to the router-config.ts. This includes importing the new route and adding it to the CliRouteConfig array.
ng generate route should have a flag --no-route-generation (open to suggestions) that avoid the addition of it to the CliRouteConfig array.
README.md documentation for this.
e2e tests for it.
[1]
@Component({selector: '<%= htmlComponentName %>-app',providers: [],templateUrl: 'app/<%= htmlComponentName %>.html',directives: [ROUTER_DIRECTIVES],pipes: []})
@RouteConfig([].concat(CliRouteConfig))exportclass<%=jsComponentName%>App{defaultMeaning: number=42;meaningOfLife(meaning?: number){return`The meaning of life is ${meaning||this.defaultMeaning}`;}}
Tasklist:
angular-cli/router-config.tsto the scaffold. This is part of the project. The content of this file should have a comment at the top to say to not touch this file, and export aCliRouteConfig(open to name suggestions).README.mdto theangular-clidirectory to explain that this is generated code. We will use this for other things such as providers and third party libraries.CliRouteConfigin the defaultsrc/app/__name__.ts. The code should look something like [1].ng generate routeneeds to add the route info to therouter-config.ts. This includes importing the new route and adding it to theCliRouteConfigarray.ng generate routeshould have a flag--no-route-generation(open to suggestions) that avoid the addition of it to theCliRouteConfigarray.README.mddocumentation for this.[1]