Skip to content

Commit

Permalink
fix(module export): implemented a forRoot method
Browse files Browse the repository at this point in the history
  • Loading branch information
BioPhoton committed Jul 6, 2017
1 parent 263a662 commit c5acad7
Showing 1 changed file with 15 additions and 11 deletions.
26 changes: 15 additions & 11 deletions src/star-rating.module.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,23 @@
import { NgModule } from '@angular/core';
import { ModuleWithProviders, NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { StarRatingComponent } from "./star-rating.component";
import { StarRatingConfig } from "./star-rating-config"
import { StarRatingComponent } from './star-rating.component';
import { StarRatingConfig } from './star-rating-config';

export{ StarRatingComponent} from "./star-rating.component";
export { StarRatingConfig } from "./star-rating-config"
export{ StarRatingComponent } from './star-rating.component';
export { StarRatingConfig } from './star-rating-config'

const EXPORTS = [ StarRatingComponent ];
const EXPORTS = [StarRatingComponent];

@NgModule({
imports: [ CommonModule ],
exports: [ EXPORTS ],
declarations: [ EXPORTS ],
providers: [ StarRatingConfig ]
imports: [CommonModule],
exports: [EXPORTS],
declarations: [EXPORTS]
})
export class StarRatingModule {

static forRoot(): ModuleWithProviders {
return {
ngModule: StarRatingModule,
providers: [StarRatingConfig]
}
}
}

0 comments on commit c5acad7

Please sign in to comment.