0

I am using ui-rooter with Angularjs. I have this button :

<button type="button" 
    class="btn btn-primary" 
    ui-sref="tool-plain({id:vm.tool.id})" target="_blank">
        <i class="fa fa-user"></i>&nbspTool
</button>

and this state file :

.state('tool-plain', {
    parent: 'entity',
    url: '/tool/{id}',
    data: {
        authorities: ['ROLE_USER'],
        pageTitle: 'Tool'
    },
    views: {
        'content@': {
            templateUrl: 'app/entities/tool/tool-plain.html',
            controller: 'ToolDialogController',
            controllerAs: 'vm'
        }
    },
    resolve: {
        entity: ['$stateParams', 'Tool', function($stateParams, Tool) {
            return Tool.get({id : $stateParams.id});
        }]
    }
})

When I click on the button nothing happens.

How should I do to open the link in a new tab?

Thanks

thomas
  • 1,201
  • 2
  • 15
  • 35

0 Answers0