mirror of
https://github.com/angular/angular-cli.git
synced 2025-05-20 21:42:38 +08:00
32 lines
782 B
TypeScript
32 lines
782 B
TypeScript
/**
|
|
* @license
|
|
* Copyright Google Inc. All Rights Reserved.
|
|
*
|
|
* Use of this source code is governed by an MIT-style license that can be
|
|
* found in the LICENSE file at https://angular.io/license
|
|
*/
|
|
import { UnitTestTree } from '@angular-devkit/schematics/testing';
|
|
|
|
|
|
export function createAppModule(tree: UnitTestTree, path?: string): UnitTestTree {
|
|
tree.create(path || '/src/app/app.module.ts', `
|
|
import { BrowserModule } from '@angular/platform-browser';
|
|
import { NgModule } from '@angular/core';
|
|
import { AppComponent } from './app.component';
|
|
|
|
@NgModule({
|
|
declarations: [
|
|
AppComponent
|
|
],
|
|
imports: [
|
|
BrowserModule
|
|
],
|
|
providers: [],
|
|
bootstrap: [AppComponent]
|
|
})
|
|
export class AppModule { }
|
|
`);
|
|
|
|
return tree;
|
|
}
|