diff --git a/js/ngPopover.js b/js/ngPopover.js index 77b1316..55479b7 100644 --- a/js/ngPopover.js +++ b/js/ngPopover.js @@ -182,10 +182,11 @@ module.provider('ngPopover', function () { var useParentWidth = options.useparentwidth || false; var anchorSelector = options.anchorselector || ''; var maxWidth = options.maxwidth || null; + var parsejson = options.parsejson || false; if (options.data) { scope = scope.$new(); - scope.rrData = options.data; + scope.rrData = parsejson ? JSON.parse(options.data) : options.data; } var setupClick = function() { @@ -271,4 +272,4 @@ module.directive('ngPopover', ['ngPopover', function(ngPopover) { } } -}]); \ No newline at end of file +}]);