2

Angular UI Router is ignoring HTML5Mode(false), and it's rendering links in a way that can't be bookmarked or directly landing upon:

app.js:

$stateProvider
    .state('search', {
      url: '/search',
      views: {
        'main.wrapper': {
          templateUrl: 'views/search.html',
          controller: 'SearchCtrl'
        },
        'navbar': { templateUrl: 'views/search.navbar.html' }
      });

$locationProvider.html5Mode(false);

foo.html:

<a ui-sref="search">Search</a>

Becomes

<a href="/search">Search</a>

Shouldn't it detect it's not on HTML5 Mode and return

<a href="/#/search">Search</a>
2

1 Answer 1

2

As indicated by Radim Köhler, this is a bug between angular-ui-router ~0.2.11 and angular 1.3.0.

https://github.com/angular-ui/ui-router/issues/1397

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.