Pass parameters from hidden field to AngularJS
<p>i am new to AngularJS so i need a little help.</p>

<p>I have two hidden input fields:</p>

<pre><code>&lt;input type="hidden" name="page_type" value="news"&gt;
&lt;input type="hidden" name="page_id" value="24"&gt;
</code></pre>

<p>I need to pass the values to the AngularJS Factory:</p>

<pre><code>angular.module('commentService', [])

.factory('Comment', function($http) {

return {
    // get all the comments
    get : function(page_type, page_id) {
        return $http.get('/api/comments/index/'+page_type+'/'+page_id);
    }
}

});
</code></pre>