search

Home  >  Q&A  >  body text

angular.js - ng1 url problem

Today I found that there is an extra exclamation point in the URL in the browser. Does anyone know what is going on?

http://localhost:3000/#!/home
phpcn_u1582phpcn_u15822823 days ago576

reply all(2)I'll reply

  • 伊谢尔伦

    伊谢尔伦2017-05-15 17:11:59

    Have you upgraded the new version of ng-route? The default is '#!'.

    Official documentation is here: https://docs.angularjs.org/api/ng/provider/$locationProvider

    You can use hashPrefix to remove the exclamation point in config.

    $locationProvider.hashPrefix('');

    reply
    0
  • 漂亮男人

    漂亮男人2017-05-15 17:11:59

    You can search angular hashbang

    reply
    0
  • Cancelreply