File tree 1 file changed +11
-0
lines changed
public/resources/js/directives 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ angularIO.directive('apiList', function () {
27
27
var $ctrl = this ;
28
28
29
29
$ctrl . apiTypes = [
30
+ { cssClass : 'stable' , title : 'Stable' , matches : [ 'stable' ] } ,
30
31
{ cssClass : 'directive' , title : 'Directive' , matches : [ 'directive' ] } ,
31
32
{ cssClass : 'decorator' , title : 'Decorator' , matches : [ 'decorator' ] } ,
32
33
{ cssClass : 'class' , title : 'Class' , matches : [ 'class' ] } ,
@@ -51,6 +52,16 @@ angularIO.directive('apiList', function () {
51
52
var isVisible = false ;
52
53
53
54
section . items . forEach ( function ( item ) {
55
+
56
+ // Filter by stability (ericjim: only 'stable' for now)
57
+ if ( $ctrl . apiType && $ctrl . apiType . matches . length === 1 &&
58
+ $ctrl . apiType . matches [ 0 ] === 'stable' && item . stability === 'stable' ) {
59
+ item . show = true ;
60
+ isVisible = true ;
61
+ return isVisible ;
62
+ } // NOTE: other checks can be performed for stability (experimental, deprecated, etc)
63
+
64
+ // Filter by docType
54
65
var matchesDocType = ! $ctrl . apiType || $ctrl . apiType . matches . indexOf ( item . docType ) !== - 1 ;
55
66
var matchesTitle = ! apiFilter || item . title . toLowerCase ( ) . indexOf ( apiFilter ) !== - 1 ;
56
67
item . show = matchesDocType && ( matchesTitle || matchesModule ) ;
You can’t perform that action at this time.
0 commit comments