Tutorialsplane

AngularJs Decode URL


AngularJs Decode URL String Example : We can use the javascript inbuilt function decodeURIComponent(uri), encodeURI(uri) or escape(uri) to decode the uri string. Here in this tutorial we are going to explain how you can decode the uri string with example and online demo.


AngularJs Encode URL| URI Component | JavaScript | Example

Let us create a simple example to use the function dcodeURIComponent(uri) to decode the uri component.

AngularJs Decode URI Component: Example



 
 

  
<div ng-app="myApp">  
<div ng-controller="myController">  
    <button ng-click="encodeUrlStr()">Decode URL</button>
	<br/>
	URL1 = {{url1}}<br/>
	URL2 = {{url2}}
</div> 
</div>
  
                                                                                                                

Try it »

If you run the above example it will produce output something like this –