Skip to content

Instantly share code, notes, and snippets.

@sparrow
Last active March 9, 2017 06:34
This is a TypeScript code snippet that we used for our blog post https://rubygarage.org/blog/the-angular-2-vs-react-contest-only-livens-up at RubyGarage. The code shows how to register multiple app components in an Angular 2 module.
import { NgModule } from '@angular/core';
import { AppComponent } from './app.component';
import { LaptopsComponent } from './laptops/laptop.component';
import { LaptopPartsComponent } from './laptops/laptop-parts.component';
@NgModule({
imports: [ ],
declarations: [
AppComponent,
LaptopsComponent,
LaptopPartsComponent ],
bootstrap: [ AppComponent ]
})
export class AppModule {}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment