I have the following code in my controller.js file where I am retrieving the value of "postresult".
$scope.open= function(post) {
$scope.postresult = post;
}
In the HTML snippet below, I am loading a DISQUS thread and need to access the "postresult" object. How can I achieve this?
<script type="text/javascript">
var pid = '{{postresult.id}}';
var pid1 = 'postresult.id';
/* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
var disqus_shortname = 'a2b'; // replace with your forum shortname
var disqus_identifier = '{{postresult.id}}' ;
var disqus_title = '{{postresult.postText}}';
var disqus_url = 'http://example.com/{{postresult.id}}';
/* * * DON'T EDIT BELOW THIS LINE * * */
(function() {
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
})();
var reset = function (postresult.id, http://example.com/{{postresult.id}}, postresult.postText, en) {
DISQUS.reset({
reload: true,
config: function () {
this.page.identifier = newIdentifier;
this.page.url = newUrl;
this.page.title = newTitle;
this.language = newLanguage;
}
});
};
</script>