Skip to content

Commit

Permalink
fix: lazy loading issue
Browse files Browse the repository at this point in the history
fixes #366
  • Loading branch information
Shlomi Assaf (shlassaf) committed Jun 20, 2017
1 parent 068ca48 commit f9f6d2e
Show file tree
Hide file tree
Showing 10 changed files with 19 additions and 10 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "angular2-modal",
"description": "Angular2 Modal (dialog) window.",
"version": "3.0.0",
"version": "3.0.1",
"repository": {
"type": "git",
"url": "https://github.com/shlomiassaf/angular2-modal.git"
Expand Down
2 changes: 1 addition & 1 deletion src/angular2-modal/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "angular2-modal",
"description": "Angular2 Modal (dialog) window.",
"version": "3.0.0",
"version": "3.0.1",
"libConfig": {
"entry": "angular2-modal",
"inlineResources": true,
Expand Down
2 changes: 1 addition & 1 deletion src/angular2-modal/plugins/bootstrap/package.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"version": "3.0.0"
"version": "3.0.1"
}
2 changes: 1 addition & 1 deletion src/angular2-modal/plugins/js-native/package.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"version": "3.0.0"
"version": "3.0.1"
}
2 changes: 1 addition & 1 deletion src/angular2-modal/plugins/vex/package.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"version": "3.0.0"
"version": "3.0.1"
}
8 changes: 6 additions & 2 deletions src/angular2-modal/src/overlay/overlay.service.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ViewContainerRef, Injectable } from '@angular/core';
import { ViewContainerRef, Injectable, Injector } from '@angular/core';

import { OverlayRenderer, OverlayConfig } from '../models/tokens';
import { DialogRefStack } from '../models/dialog-ref-stack';
Expand All @@ -14,7 +14,7 @@ export class Overlay {
return _stack.length;
}

constructor(private _modalRenderer: OverlayRenderer) {
constructor(private _modalRenderer: OverlayRenderer, protected injector: Injector) {
}

/**
Expand Down Expand Up @@ -69,6 +69,10 @@ export class Overlay {
config.context.normalize();
}

if (!config.injector) {
config.injector = this.injector;
}

let dialog = new DialogRef<any>(this, config.context || {});
dialog.inElement = config.context && !!config.context.inElement;

Expand Down
2 changes: 0 additions & 2 deletions src/demo/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import { ModalModule } from 'angular2-modal';

import { ENV_PROVIDERS } from './environment';
import { SharedModule } from './shared.module';
import { BootstrapDemoModule } from './bootstrap-demo/bootstrap-demo.module';
import { VexDemoModule } from './vex-demo/vex-demo.module';
import { JSNativeDemoModule } from './js-native-demo/js-native-demo.module';

Expand All @@ -23,7 +22,6 @@ import { InAppModalModule } from './home/in-app-plugin/index';
RouterModule.forRoot(routes, { useHash: true, preloadingStrategy: PreloadAllModules }),
SharedModule.forRoot(),
ModalModule.forRoot(),
BootstrapDemoModule,
VexDemoModule,
JSNativeDemoModule,
InAppModalModule
Expand Down
1 change: 1 addition & 0 deletions src/demo/app/app.routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { Home } from './home/home';

export const routes: Routes = [
{ path: 'home', component: Home },
{ path: 'bootstrap-demo', loadChildren: './bootstrap-demo/bootstrap-demo.module#BootstrapDemoModule' },
{ path: '', redirectTo: 'home', pathMatch: 'full'}
];

2 changes: 1 addition & 1 deletion src/demo/app/bootstrap-demo/bootstrap-demo.routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { BootstrapDemoPage } from './bootstrap-demo-page/bootstrap-demo-page';
import { ModalCustomisationWizard } from './modal-customisation-wizard/modal-customisation-wizard';

export const routing: ModuleWithProviders = RouterModule.forChild([
{ path: 'bootstrap-demo', component: BootstrapDemo, children: [
{ path: '', component: BootstrapDemo, children: [
{ path: '', component: BootstrapDemoPage, pathMatch: 'full'},
{ path: 'customizeModals', component: ModalCustomisationWizard }
]
Expand Down
6 changes: 6 additions & 0 deletions version_cache.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"angular2-modal": {
"commit": "a5da320f0f558ba0e631785a6987e698b00f677c",
"version": "3.0.0"
}
}

0 comments on commit f9f6d2e

Please sign in to comment.