code: function(item, disabled){
                      scope.List.push({
                          value: $sce.trustAsHtml(item.value),
                          title: item.title,
                          liClass: disabled ? scope.disabledClass : '',
                          action: function(){
                              if(!disabled) {
                                  internalAction(scope, item.page);
                              }
                          }
                      });
                  }
docs: Create the Add Item Function