Angular template for a dropdown menu
I think this is solid code. All I can think of is a repeat pointing to an array in the controller. I do this on some of our web apps that have high-freq of changes to menu items.

I don't know if this would really be a good refactor otherwise as it just abstracts away more of the template but it definitely DRY's it up. 

BTW I'm not familiar with that templating lib so I apologize if there are any problems with the syntax. 

template

 %ul.dropdown-menu(aria-labelledby="single-button" role="menu" uib-dropdown-menu)
        %li(role="menuitem" ng-repeat="item in doc_dropdown")
          %a(
             href={{ ( item.is_path ) ? item.pathLocation : true }} 
             ng-click={{ item.clickTrigger }}
             ng-hide={{ ( item.can_hide ) ? "documentTemplate.parent_id" : "" }}
            ) 
                {{item.text}}


somewhere in the controller

doc_dropdown = [
    {
        is_path: true,
        pathLocation: "/legal-forms/admin/document_templates/{{ documentTemplate.id }}/edit", 
        text: "Edit", 
        click_trigger: null,
        can_hide: false 
    },{
        is_path: true,
        pathLocation: "/legal-forms/admin/document_templates/{{ documentTemplate.id }}/open_in_wizard", 
        text: "Create Document", 
        click_trigger: null,
        can_hide: false 
    },{
        is_path: true,
        pathLocation: "/legal-forms/admin/document_templates/{{ documentTemplate.id }}/preview", 
        text: "Preview", 
        click_trigger: null,
        can_hide: false 
    },{
        is_path: false,
        pathLocation: null, 
        text: "Copy", 
        click_trigger: "copy(documentTemplate)",
        can_hide: true  
    },{
        is_path: false,
        pathLocation: null, 
        text: "Delete", 
        click_trigger: "delete(documentTemplate)",
        can_hide: false 
    },
];