How Non-angular Abstract States Works

3

I'm working on an APP and I'm still learning the features of the angle.

I have a route file and I was suggested to add the abstract: true parameter to prevent url navigation. But I've been researching more about it and I do not quite understand what it actually does.

In anything I read, it says that it prevents browsing through the url. So I would like to know what the real functionality of this property is?

    
asked by anonymous 20.12.2016 / 14:14

1 answer

2

A practical example may illustrate some possibilities.

Imagine that you have an application where access to a given state is controlled by permissions - for example, #/usuarios is a state that displays the list of users, but only users with admin permission can see it.

You can create an abstract state - acessoNegado , for example - which is invoked when the usuarios state is accessed without proper permissions.

So the URL in the browser is still #usuarios , but the user is viewing the contents of #acessoNegado .

    
21.12.2016 / 00:59