Skip to content

Commit

Permalink
Step 23.11: bootstrap using UpgradeAdapter
Browse files Browse the repository at this point in the history
  • Loading branch information
Kamil Kisiela authored and Dotan Simha committed Nov 22, 2016
1 parent a20e34a commit 687a708
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions client/main.ts
@@ -1,4 +1,8 @@
import 'angular2-meteor-polyfills/browser';
import * as angular from 'angular';
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { FormsModule } from '@angular/forms';
import { UpgradeAdapter } from '@angular/upgrade';

import { Meteor } from 'meteor/meteor';
Expand All @@ -24,7 +28,15 @@ import { registerPassword } from '../imports/ui/components/password/password';
import { registerRegister } from '../imports/ui/components/register/register';
import { registerSocially, SociallyNg1Module } from '../imports/ui/components/socially/socially';

const adapter = new UpgradeAdapter();
@NgModule({
imports: [
BrowserModule,
FormsModule
]
})
class AppNg2Module {}

const adapter = new UpgradeAdapter(AppNg2Module);

registerAuth(adapter);
registerLogin(adapter);
Expand All @@ -48,7 +60,7 @@ registerRegister(adapter);
registerSocially(adapter);

function onReady() {
angular.bootstrap(document, [
adapter.bootstrap(document.body, [
SociallyNg1Module.name
]);
}
Expand Down

0 comments on commit 687a708

Please sign in to comment.