diff --git a/src/lib/snack-bar/snack-bar-ref.ts b/src/lib/snack-bar/snack-bar-ref.ts index e06331f29fc3..c4e45c59a67f 100644 --- a/src/lib/snack-bar/snack-bar-ref.ts +++ b/src/lib/snack-bar/snack-bar-ref.ts @@ -9,11 +9,18 @@ import {MdSnackBarContainer} from './snack-bar-container'; * Reference to a snack bar dispatched from the snack bar service. */ export class MdSnackBarRef { - /** 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 = new Subject(); @@ -28,7 +35,7 @@ export class MdSnackBarRef { 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()); diff --git a/tools/dgeni/processors/component-grouper.js b/tools/dgeni/processors/component-grouper.js index 8bab3d52506c..91b367a75b54 100644 --- a/tools/dgeni/processors/component-grouper.js +++ b/tools/dgeni/processors/component-grouper.js @@ -14,6 +14,7 @@ class ComponentGroup { this.docType = 'componentGroup'; this.directives = []; this.services = []; + this.additionalClasses = []; this.ngModule = null; } } @@ -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); } }); diff --git a/tools/dgeni/templates/componentGroup.template.html b/tools/dgeni/templates/componentGroup.template.html index 214a8ac3cb8c..b490e4dc79e8 100644 --- a/tools/dgeni/templates/componentGroup.template.html +++ b/tools/dgeni/templates/componentGroup.template.html @@ -52,3 +52,10 @@

Directives

{$ class(directive) $} {% endfor %} {%- endif -%} + +{%- if doc.additionalClasses.length -%} +

Additional classes

+ {% for other in doc.additionalClasses %} + {$ class(other) $} + {% endfor %} +{%- endif -%}