fix(@schematics/angular): consecutive blank lines in routing.module.ts#18226
fix(@schematics/angular): consecutive blank lines in routing.module.ts#18226clydin merged 1 commit intoangular:masterfrom
Conversation
alan-agius4
left a comment
There was a problem hiding this comment.
Hi @sacgrover,
Thanks for this, however I think the proper fix would be something like the below, as otherwise when there is the import for the component file there wouldn't be a blank line between the import and the const declaration.
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';<% if (lazyRoute) { %>
import { <%= classify(name) %>Component } from './<%= dasherize(name) %>.component';<% } %>
const routes: Routes = [<% if (lazyRoute) { %>{ path: '', component: <%= classify(name) %>Component }<% } %>];|
@alan-agius4 Ok, I will do that.. Actually, I made the same earlier but to make it consistent with other I modified. Because there are a blank line between module import and component import in other places. |
|
@sacgrover, I see, in that case there should be a blank line in the logical statement and before the constant declaration. import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';<% if (lazyRoute) { %>
import { <%= classify(name) %>Component } from './<%= dasherize(name) %>.component';<% } %>
const routes: Routes = [<% if (lazyRoute) { %>{ path: '', component: <%= classify(name) %>Component }<% } %>]; |
|
Changes done as per asked. |
Could You please rerun it as i don't have permissions for it? |
|
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |

Fixes: #18220