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

android - Why am I getting the message 'Youractivity.java is not an activity subclass or alias' -

python - How do I create a list index that loops through integers in another list -

c# - “System.Security.Cryptography.CryptographicException: Keyset does not exist” when reading private key from remote machine -