javascript - HTML5 pushstate on angular.js, link to download the file is not working? -


today trying use html5 pushstate in application remove # url. achieve have injected $locationprovider in router , , doing $locationprovider.html5mode(true); have found many online resources. not working removed # urls , added in index.html.

tts working fine every url in whole application. in application u can upload file , if file uploaded successfully, file name visible on page , if u click on file name able download it.  problem in pushstate, if click on file name nothing  happening. tried multiple combination no luck. 

// router.js  angular.module('myapp').config(function ($stateprovider, $urlrouterprovider,$locationprovider) {  $stateprovider      .state('home', {        url: '/',        templateurl: 'app/main/main.html',        controller: 'mainctrl',        controlleras: 'mainctrl'      })    $urlrouterprovider.otherwise('/');    $locationprovider.html5mode(true);  });
<!--here link not working-->  <!--{{documenturl}} stands /api/document/getexistingfile -->  <tr data-ng-repeat="filemodel in files">          <td>              <span ng-show="filemodel.status == '200'">                <a href="javascript:void(0)" ng-href="{{documenturl}}/{{filemodel.id}}">{{filemodel.file.name}}</a>              </span>              <span ng-hide="filemodel.status == '200'">                <strong>{{ filemodel.file.name }}</strong>              </span>          </td>        <!--below code of index,html defining <base href="/"> -->        <head>    <base href="/">  </head>    


Comments

Popular posts from this blog

sql - VB.NET Operand type clash: date is incompatible with int error -

SVG stroke-linecap doesn't work for circles in Firefox? -

python - TypeError: Scalar value for argument 'color' is not numeric in openCV -