Skip to content

Need scope.$apply in version 1.1.0 #12

Open
@Woodu

Description

@Woodu

On close function:
if (typeof this.onClose === 'function') this.onClose.apply(this, [this.scope]);
and in the setTimeout function:
if (typeof self.onDestroy == 'function') self.onDestroy.apply(self, [self.scope]);

These two functions will not emit anything to angular,so some angular function calls in onClose or onDestroy will not work properly like:
onDestroy: function () { $location.path($scope.backurl); return true; }

so I changed those code to:
if (typeof this.onClose === 'function') { this.onClose.apply(this, [this.scope]); self.scope.$parent.$apply(); }

to call angular apply the changes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions