Changing The Hash With The Location Service In Angular 4.4.0-RC.0

0
206
views

The Angular framework provides two ways of working with the browser location: the Location service for direct URL manipulation; and, the Router for more advanced URL manipulation, parsing, and view rendering. In an application, I would use the Router; but, in my Angular demos, the Router is way overkill; so I often reach for the Location service. Now, one thing that’s not obvious in the Location documentation is how to change the location Hash or fragment. As it turns out, you can include the hash in the “path” argument when navigating (as long as you also include the optional query-string in the path as well)

Changing The Hash With The Location Service In Angular 4.4.0-RC.0

Read More : https://www.bennadel.com//blog/3331-changing-the-hash-with-the-location-service-in-angular-4-4-0-rc-0.htm

LEAVE A REPLY

Please enter your comment!
Please enter your name here