Question

I have a problem with acessing $scope in prettyPhoto inline opened HTML. This is simple HTML in which I have ng-click.

<div id="inputMask" class="gridSystem modalWindow responsive" style="display:none;">
...
</div>

and here is JS for creating prettyPhoto modal window:

$.prettyPhoto.open('#inputMask','','');

PrettyPhono creates special DIV, which I cannot connect with controller and/or $scope.

Does anybody have any idea how this should be made?

Tnx

Was it helpful?

Solution

AngularJS would not work with dynamically generated content that the prettyphoto plugin generates, since angular needs to compile the html and setup the necessary watches.

You need to wrap the jquery plugin into a directive and manually update the scope elements based on the events handlers available for the plugin.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top