Bootstrapping ng-metadata

ng-metadata provides @NgModule from Angular 2 to Angular 1. To use @NgModule, update your application bootstrap from angular.bootstrap to the example below.

Bootstrap (bootstrap.ts)

import { platformBrowserDynamic } from 'ng-metadata/platform-browser-dynamic';
import { AppModule } from './app.module';

platformBrowserDynamic().bootstrapModule(AppModule);

App Module (app.module.ts)

import { NgModule } from 'ng-metadata/core';
import { AppComponent } from './app.component';
import { HeroComponent } from './hero.component';
import { HeroService } from './hero.service';

@NgModule({
  declarations: [AppComponent, HeroComponent],
  providers: [HeroService]
})
export class AppModule {}

results matching ""

    No results matching ""