1

I have the hyperlink like this in my view:

<a ng-switch-when="true" href="" data-ng-click="goToTest(data)">
    {{data.current_state_title}}
</a>

On controller my goToTest method using ui-router like this:

$scope.goToTask = function (value) {
    

    $state.go('my_work.test’, {
        sourceId: value.source_versions[0].source_id, 
        sourceVersionId: value.source_versions[0].id
    });
  
};

So I need to open this my_work.test url in one tab of browser and another url for e.g: my_work.test_list into another tab of browser in one click.

I am also new to the angularjs. Any help will be really appreciated.

H. Pauwelyn
  • 13,575
  • 26
  • 81
  • 144
Sabbu
  • 169
  • 1
  • 2
  • 15
  • Ok I solved the problem of opening the two tab with different url like this :var url= $state.href('my_work.test_list', {sourceId: task.source_versions[0].source_id, sourceVersionId: task.source_versions[0].id}); var myWindow=window.open(url,'doc_view',''); . But the problem I am facing now is I cannot focus the old window.I do some research and fond this link http://stackoverflow.com/questions/10812628/open-a-new-tab-in-the-background most of people say solve the same issue I have.But for me it is not working. – Sabbu Dec 11 '15 at 22:35

0 Answers0