1

I have a component I want to call

$stateProvider
.state('authorized', { url: '/authorized', template: '<authorize></authorize>' })

$locationProvider.html5Mode(true);

but when I do this in the address bar, there is a 404 not found, when I call it by its state there is no problem.

GET http://localhost:8080/authorized 404 (Not Found)

But when I would add this component to another state I already had, I can access it in the address bar.

.state('pallettypes', {
      url: '/pallettypes',
      template: '<authorize></authorize>'
  })

Can somebody please tell me why the former doesn't work and the latter doesn't give an error?

4
  • what ever you write in url is write, it should work, Clear the cache of browser or clean and buil project, may be it will work Commented Aug 26, 2016 at 6:49
  • I did what u told me, but that doesn't fix it
    – Tommek
    Commented Aug 26, 2016 at 8:42
  • See whatever you share is write, may be there is some another issue so share some more code related to this. Like $stateProvider, .config.. Commented Aug 26, 2016 at 8:54
  • Solved my problem with adding a Asp.Net MVC controller for it. I forgot to mention i'm using it with angular
    – Tommek
    Commented Aug 26, 2016 at 12:34

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.