File tree Expand file tree Collapse file tree 4 files changed +19
-10
lines changed Expand file tree Collapse file tree 4 files changed +19
-10
lines changed Original file line number Diff line number Diff line change @@ -68,14 +68,11 @@ module.exports = function categorizer() {
6868 }
6969
7070 /**
71- * Decorates public exposed docs. Creates a property with CSS classes that will be
72- * added to the template .
71+ * Decorates public exposed docs. Creates a property on the doc that indicates whether
72+ * the item is deprecated or not .
7373 **/
7474 function decoratePublicDoc ( doc ) {
75- // Specific classes that will can added to the Dgeni doc template.
76- doc . docClasses = [
77- isDeprecatedDoc ( doc ) ? 'docs-api-deprecated' : ''
78- ] . join ( ' ' ) ;
75+ doc . isDeprecated = isDeprecatedDoc ( doc ) ;
7976 }
8077} ;
8178
Original file line number Diff line number Diff line change 1- < div class =" {$ class.docClasses $} " >
1+ < div >
22 < h4 class ="docs-api-h4 docs-api-class-name ">
33 < code > {$ class.name $}</ code >
44 </ h4 >
@@ -9,6 +9,10 @@ <h4 class="docs-api-h4 docs-api-class-name">
99 < span class ="docs-api-class-export-name "> {$ class.directiveExportAs $}</ span >
1010 {%- endif -%}
1111
12+ {%- if class.isDeprecated -%}
13+ < div class ="docs-api-class-deprecated-marker "> Deprecated</ div >
14+ {%- endif -%}
15+
1216 {$ propertyList(class.properties) $}
1317
1418 {$ methodList(class.methods) $}
Original file line number Diff line number Diff line change 1- < table class ="docs-api-method-table {$ method.docClasses $} ">
1+ < table class ="docs-api-method-table ">
22 < thead >
33 < tr class ="docs-api-method-name-row ">
4- < th colspan ="2 " class ="docs-api-method-name-cell "> {$ method.name $}</ th >
4+ < th colspan ="2 " class ="docs-api-method-name-cell ">
5+ {%- if method.isDeprecated -%}
6+ < div class ="docs-api-deprecated-marker "> Deprecated</ div >
7+ {%- endif -%}
8+ {$ method.name $}
9+ </ th >
510 </ tr >
611 </ thead >
712 < tr class ="docs-api-method-description-row ">
Original file line number Diff line number Diff line change 1- < tr class ="docs-api-properties-row {$ property.docClasses $} ">
1+ < tr class ="docs-api-properties-row ">
22 < td class ="docs-api-properties-name-cell ">
33 {%- if property.isDirectiveInput -%}
44 < div class ="docs-api-input-marker ">
1818 {%- endif -%}
1919 </ div >
2020 {%- endif -%}
21+ {%- if property.isDeprecated -%}
22+ < div class ="docs-api-deprecated-marker "> Deprecated</ div >
23+ {%- endif -%}
2124
2225 < p class ="docs-api-property-name ">
2326 {$ property.name $}
You can’t perform that action at this time.
0 commit comments