Skip to content

Commit

Permalink
fix(sortable): Changed reference to BrowserModule to CommonModule ins…
Browse files Browse the repository at this point in the history
…tead (#1503)

* Library Modules should not import BrowserModule anywhere

Caused error: 
`BrowserModule has already been loaded. If you need access to common directives such as NgIf and NgFor from a lazy loaded module, import CommonModule instead.`

After trying on lazy loaded app, that had `Ng2BootstrapModule.forRoot()` imported in root App Module.

* changed code styling to be consistent with the rest

Hopefully it will pass CI tests now!
  • Loading branch information
somombo authored and valorkin committed Jan 16, 2017
1 parent 651fcb3 commit e7105c6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/sortable/sortable.module.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { NgModule, ModuleWithProviders } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { CommonModule } from '@angular/common';

import { SortableComponent } from './sortable.component';
import { DraggableItemService } from './draggable-item.service';

@NgModule({
declarations: [SortableComponent],
imports: [BrowserModule],
imports: [CommonModule],
exports: [SortableComponent]
})
export class SortableModule {
Expand Down

0 comments on commit e7105c6

Please sign in to comment.