Best way to parse a query string with AngularJS without using html5mode

后端 未结 1 1182
粉色の甜心
粉色の甜心 2020-12-30 20:18

What\'s the best way to parse a query string in Angular without using html5mode? (Not using html5mode because we need to support older

相关标签:
1条回答
  • 2020-12-30 20:52

    the query params should go after the hash:

    http://localhost/test#/?param1=abc&param2=def

    this should allow $location.search() to return an object like:

    {
      param1: 'abc',
      param2: 'def'
    }
    
    0 讨论(0)
提交回复
热议问题