title: Angularjs. Open content in new tab
body: <p>I've read similar questions/answers on SO, but can't resolve my problem.
  Here is the setup:
  <strong>index.html</strong></p>
  
  <pre><code>&lt;li ng-repeat="a in article"&gt;
     &lt;a ng-click="articleDetails(a.id)"&gt;
       {{a.title_en}}
     &lt;/a&gt;
  &lt;/li&gt;
  </code></pre>
  
  <p><strong>js file</strong></p>
  
  <pre><code>angular.module('myApp.article', ['ngRoute'])
      .config(['$routeProvider', '$locationProvider', function ($routeProvider, $locationProvider) {
          $routeProvider.when('/article/:id', {
              templateUrl: 'article/article.html',
              controller: 'ArticleDetailCtrl'
          });
          //$locationProvider.html5Mode(true);
      }])        
      .controller('ArticleDetailCtrl', ['$http', '$routeParams', '$scope', '$window', '$location',
          function ($http, $routeParams, $scope, $window, $location) {
             $scope.params = 'blabla';
          }])
  </code></pre>
  
  <p><strong>article.html</strong></p>
  
  <pre><code>&lt;div&gt;{{params}}&lt;/div&gt;
  </code></pre>
  
  <p><strong>Question:</strong> When I click the link in index.html new tab is opened as expected with correct url, however, instead of article details I get <strong>Not found</strong> on the webpage. What might be a problem?</p>
  
  <p><strong>EDIT 1</strong>: Function articleDetail is defined as follows in another controller that is used in index.html:</p>
  
  <pre><code>$scope.articleDetails = function (id) {
                  $scope.id = id;
                  $scope.window = $window.open('article/' + id, '_blank');
              }
  </code></pre>