Problem: when I open a modal popup page containing javascript and css, both reflects on the parent page, making a mess. I use angularjs and open the modal like this:
var modalInstance = $modal.open({
animation: true,
templateUrl: 'myPopup.html',
controller: 'MyController',
scope: $scope
});
and even when I close the popup the parent page continues messed up. How can I isolate the popup css and javascript in a way that they don't reflect on the parent page ? Is there a simple way to do this ?
ps. I tried to create a new scope and pass it as parameter to the modal expecting that the DOM of the parent page would not be modified, but no success.
Edit: the link of the component is this.