Created
October 5, 2016 16:34
-
-
Save joeeames/faca77557a431788e42940ea886669d4 to your computer and use it in GitHub Desktop.
dealing with circular dependencies with ngUpgrade and modules
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { NgModule, forwardRef } from '@angular/core'; | |
import { BrowserModule } from '@angular/platform-browser'; | |
import { FormsModule, NgModel } from '@angular/forms'; | |
import { HttpModule } from '@angular/http'; | |
import { UpgradeAdapter } from '@angular/upgrade'; | |
import { NameParser } from './admin/nameParser'; | |
import { ProfileComponent } from './profile/profile.component'; | |
import { Location, LocationStrategy, HashLocationStrategy, PlatformLocation } from '@angular/common'; | |
export const upgradeAdapter = new UpgradeAdapter(forwardRef(() => AppModule)); | |
@NgModule({ | |
imports: [ | |
BrowserModule, | |
FormsModule, | |
HttpModule | |
], | |
declarations: [ | |
ProfileComponent | |
], | |
providers: [ | |
NameParser, | |
Location, | |
{provide: LocationStrategy, useClass: HashLocationStrategy} | |
] | |
}) | |
export class AppModule { } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment