I want to store the current URL in a hidden field on a form in a lightning component.
The input field on the component:
<ui:inputText aura:id="articleURL"value="{!c.getURL}"/>
Client-siide controller:
getURL : function(cmp, event){
var articleURL = window.location.pathname;
}
I recieve an error that says the value: replace is not allowed in this context. Any ideas how I should be handling this?