Transfer a variable from one js file which is in script tag of html document to controller
<p>The function</p>

<pre><code>   function showMessage(message) {

        var response = document.getElementById('response');
        var p = document.createElement('p');
        p.style.wordWrap = 'break-word';
        p.appendChild(document.createTextNode(message));
        response.appendChild(p);
    }
</code></pre>

<p>Is inside the script tag of html page. I want to access the value of the message in one of the controller in angular.js .. I cannot move this piece of code to controller but want to access the message value in controller. Please suggest how to do this.</p>