code: function (item, disabled) {
              return {
                  title: item.title,
                  aClass: item.aClass,
                  value: item.aClass ? '' : item.value,
                  liClass: disabled ? scope.disabledClass : '',
                  pgHref: disabled ? '' : scope.pgHref.replace(regex, item.page),
                  action: function () {
                      if (!disabled) {
                          internalAction(scope, item.page);
                      }
                  }
              };    
          }
docs: Create the Add Item Function