문제

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

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top