Skip to content

Latest commit

 

History

History
42 lines (31 loc) · 1.16 KB

2017-06-8-absolute-relative-url-in-angular2.md

File metadata and controls

42 lines (31 loc) · 1.16 KB
author comments date layout link slug title categories tags
riturajratan
true
2017-06-17 19:49:52 +0000
post
http://dlurratan37846/wordpress/?p=2151
absolute-relative-url-in-angular2
How to set absolute and relative url in angular2
AngularJS
JavaScript
relative url
absolute url
Angular2

Most of the time we need to set url somtimes its Absolute or some times its Relative. so lets start we will check one by one.

How to set Absolute URL

To set Absolute url we need to set `/` in starting of url by this url behave as Absolute.

{% highlight html %} {% endhighlight %}

Now if we are on http://www.maddyzone.com/home then it will redirect to http://www.maddyzone.com/user.

How to set Relative URL

To set Relative url we no need to set `/` in starting of url by this url behave as Relative.

{% highlight html %} {% endhighlight %}

Now if we are on http://www.maddyzone.com/home then it will redirect to http://www.maddyzone.com/home/user.

for any query , please comment or feedback me for this blog , how do you like this.