Skip to content

Commit

Permalink
fix(): fix for lazy loaded apps (#10)
Browse files Browse the repository at this point in the history
* feat: allow lazy loading with previous animation import

* feat: export child module from separate file

* fix: remove child export from index file

* chore: clean up lint errors
  • Loading branch information
jwelmac authored and ihadeed committed Sep 11, 2017
1 parent e66f2d0 commit f613824
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 19 deletions.
23 changes: 23 additions & 0 deletions src/tooltips.child.module.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import { NgModule } from '@angular/core';
import { IonicModule } from 'ionic-angular';
import { Tooltip } from './tooltip.directive';
import { TooltipBox } from './tooltip-box.component';

export const childArgs: NgModule = {
entryComponents: [
TooltipBox
],
declarations: [
Tooltip,
TooltipBox,
],
imports: [
IonicModule
],
exports: [
Tooltip
]
};

@NgModule(childArgs)
export class TooltipsChildModule {}
24 changes: 5 additions & 19 deletions src/tooltips.module.ts
Original file line number Diff line number Diff line change
@@ -1,23 +1,9 @@
import { childArgs } from './tooltips.child.module';
import { NgModule } from '@angular/core';
import { IonicModule } from 'ionic-angular';
import { Tooltip } from './tooltip.directive';
import { TooltipBox } from './tooltip-box.component';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';

@NgModule({
entryComponents: [
TooltipBox
],
declarations: [
Tooltip,
TooltipBox,
],
imports: [
IonicModule,
BrowserAnimationsModule
],
exports: [
Tooltip
]
})
const rootArgs: NgModule = Object.assign({}, childArgs);
rootArgs.imports.push(BrowserAnimationsModule);

@NgModule(rootArgs)
export class TooltipsModule {}

0 comments on commit f613824

Please sign in to comment.