chore: generate api docs for additional classes (#2345)

This commit is contained in:
Jeremy Elbourn
2016-12-22 09:11:29 -08:00
committed by GitHub
parent 2209308e74
commit e6fcbc020b
3 changed files with 21 additions and 4 deletions
+11 -4
View File
@@ -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();
@@ -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());
@@ -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);
}
});
@@ -52,3 +52,10 @@
{$ class(directive) $}
{% endfor %}
{%- endif -%}
{%- if doc.additionalClasses.length -%}
<h2>Additional classes</h2>
{% for other in doc.additionalClasses %}
{$ class(other) $}
{% endfor %}
{%- endif -%}