Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 11 additions & 4 deletions src/lib/snack-bar/snack-bar-ref.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,18 @@ import {MdSnackBarContainer} from './snack-bar-container';
* Reference to a snack bar dispatched from the snack bar service.
*/
export class MdSnackBarRef<T> {
/** The instance of the component making up the content of the snack bar. */
readonly instance: T;
private _instance: T;

/** The instance of the component making up the content of the snack bar. */
readonly containerInstance: MdSnackBarContainer;
get instance(): T {
return this._instance;
}

/**
* The instance of the component making up the content of the snack bar.
* @docs-private
*/
containerInstance: MdSnackBarContainer;

/** Subject for notifying the user that the snack bar has closed. */
private _afterClosed: Subject<any> = new Subject();
Expand All @@ -28,7 +35,7 @@ export class MdSnackBarRef<T> {
containerInstance: MdSnackBarContainer,
private _overlayRef: OverlayRef) {
// Sets the readonly instance of the snack bar content component.
this.instance = instance;
this._instance = instance;
this.containerInstance = containerInstance;
// Dismiss snackbar on action.
this.onAction().subscribe(() => this.dismiss());
Expand Down
3 changes: 3 additions & 0 deletions tools/dgeni/processors/component-grouper.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ class ComponentGroup {
this.docType = 'componentGroup';
this.directives = [];
this.services = [];
this.additionalClasses = [];
this.ngModule = null;
}
}
Expand Down Expand Up @@ -50,6 +51,8 @@ module.exports = function componentGrouper() {
group.services.push(doc);
} else if (doc.isNgModule) {
group.ngModule = doc;
} else if (doc.docType == 'class') {
group.additionalClasses.push(doc);
}
});

Expand Down
7 changes: 7 additions & 0 deletions tools/dgeni/templates/componentGroup.template.html
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,10 @@ <h2>Directives</h2>
{$ class(directive) $}
{% endfor %}
{%- endif -%}

{%- if doc.additionalClasses.length -%}
<h2>Additional classes</h2>
{% for other in doc.additionalClasses %}
{$ class(other) $}
{% endfor %}
{%- endif -%}