mirror of
https://github.com/angular/angular-cli.git
synced 2025-05-17 11:03:53 +08:00
Previously, `addSymbolToNgModuleMetadata()` assumed that the added symbol would not span multiple lines. In most cases, the added symbol is a single word, so this assumption was correct. In some cases, however, we might want to add a mutli-line string, such as a static method of an `@NgModule`: ```ts imports: [ SomeModule.staticMethod({ prop1: 'val1', prop2: 'val2' }) ] ``` This commit allows `addSymbolToNgModuleMetadata()` to correctly handle multi-line strings by ensuring that added metadata symbols are always put on a new line (even if the array is empty) and each line in the string is indented as necessary.