Skip to content
This repository has been archived by the owner on Feb 2, 2019. It is now read-only.

Commit

Permalink
chore: try using internal render component type method
Browse files Browse the repository at this point in the history
 - syntax errors on IE seem to indicate that the codegen is failing for the renderer, which makes me think perhaps the string id given to the ComponentRenderType is important. Use the (internal) API instead of generating our own id to test the theory.
  • Loading branch information
justindujardin committed Jan 17, 2016
1 parent 4c74321 commit fdffe43
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions ng2-material/components/dialog/dialog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import {
Injectable,
ResolvedProvider,
RenderComponentType,
AppViewManager,
ViewEncapsulation,
Injector,
Renderer,
Expand Down Expand Up @@ -44,16 +45,18 @@ export class MdDialog {
* Unique id counter for RenderComponentType.
* @private
*/
static _uniqueId:number = 0;
static _uniqueId: number = 0;

/**
* Renderer for manipulating dialog and backdrop component elements.
* @private
*/
private _renderer: Renderer = null;

constructor(public componentLoader: DynamicComponentLoader,rootRenderer: RootRenderer) {
let type = new RenderComponentType(`__md-dialog-${MdDialog._uniqueId++}`, ViewEncapsulation.None, []);
constructor(public componentLoader: DynamicComponentLoader,
appViewManager: AppViewManager,
rootRenderer: RootRenderer) {
let type = (<any>appViewManager).createRenderComponentType(ViewEncapsulation.None, []);
this._renderer = rootRenderer.renderComponent(type);
}

Expand Down

0 comments on commit fdffe43

Please sign in to comment.