AngularJS directive scope variable doesnt update after reopening the window

TestzWCh

This question might seem as if it was asked before but I can't find solution anywhere.

I have directive to which i pass array

    <div modal-panel 
     array="ctrl.array" >
    </div>

and i get it in scope

       scope: {
            array: '=',
        },

It works all good, updates, etc until I close the form and open it once again. It just doesn't update. I tried logging the contents of an array to console and it is just the old array from the time i first opened the form containing that directive. I tired doing things like

 $scope.$on('$destroy', () => { 
    $scope.array = null
 });

but it just doesnt work. Any ideas appreciated

edit

I found that the problem exists only in callback that i have to check all checkboxes in ng-table containing that array.

Is there a way to update data in a callback when this happens?

TestzWCh

I found the problem.

The directive was'nt rebuilt cause of my spa app and list of callbacks wasn't updated so there was one callback with old reference. I just deleted old callback and added new with actual reference.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Java

AngularJS directive does not update on scope variable changes

From Dev

Update angularJs directive scope variable on change parent scope

From Dev

AngularJS : directive does not update scope after $http response in parent scope

From Dev

Scope in the modal window (AngularJS directive)

From Dev

input file change listener in a directive doesnt update scope variable [plunker attached]

From Dev

Microphone doesnt work after window 10 update

From Dev

AngularJS : update parent scope from directive

From Dev

AngularJS : Pass $scope variable as directive attribute

From Dev

AngularJs, $scope.variable is undefined in a directive

From Dev

Pass variable to AngularJS directive without isolated scope

From Dev

angularjs scope variable not updated outside directive

From Dev

Setting a scope variable from a directive with AngularJS

From Dev

angularjs scope variable not updated outside directive

From Dev

AngularJS $watch controller variable from a directive with scope

From Dev

AngularJS : Scope inaccessible in directive after minification

From Java

Update parent scope variable in AngularJS

From Dev

AngularJS scope variable won't persist inside a directive with isolate scope

From Dev

why angularjs directive inherit the scope but doesn't change the scope variable?

From Dev

AngularJS scope variable won't persist inside a directive with isolate scope

From Dev

AngularJs scope variable window.open

From Dev

i cant update variable via directive in angularjs

From Dev

i cant update variable via directive in angularjs

From Dev

Update JSON attribute after scope variable update

From Dev

AngularJs update directive after a call to service method

From Dev

Display latest conversation after reopening IM window

From Dev

AngularJS binding variable outside of scope and notify update?

From Dev

AngularJS how to dynamically update part of scope with variable

From Dev

AngularJS binding variable outside of scope and notify update?

From Dev

Angularjs Update Scope variable within setTimeout not working

Related Related

  1. 1

    AngularJS directive does not update on scope variable changes

  2. 2

    Update angularJs directive scope variable on change parent scope

  3. 3

    AngularJS : directive does not update scope after $http response in parent scope

  4. 4

    Scope in the modal window (AngularJS directive)

  5. 5

    input file change listener in a directive doesnt update scope variable [plunker attached]

  6. 6

    Microphone doesnt work after window 10 update

  7. 7

    AngularJS : update parent scope from directive

  8. 8

    AngularJS : Pass $scope variable as directive attribute

  9. 9

    AngularJs, $scope.variable is undefined in a directive

  10. 10

    Pass variable to AngularJS directive without isolated scope

  11. 11

    angularjs scope variable not updated outside directive

  12. 12

    Setting a scope variable from a directive with AngularJS

  13. 13

    angularjs scope variable not updated outside directive

  14. 14

    AngularJS $watch controller variable from a directive with scope

  15. 15

    AngularJS : Scope inaccessible in directive after minification

  16. 16

    Update parent scope variable in AngularJS

  17. 17

    AngularJS scope variable won't persist inside a directive with isolate scope

  18. 18

    why angularjs directive inherit the scope but doesn't change the scope variable?

  19. 19

    AngularJS scope variable won't persist inside a directive with isolate scope

  20. 20

    AngularJs scope variable window.open

  21. 21

    i cant update variable via directive in angularjs

  22. 22

    i cant update variable via directive in angularjs

  23. 23

    Update JSON attribute after scope variable update

  24. 24

    AngularJs update directive after a call to service method

  25. 25

    Display latest conversation after reopening IM window

  26. 26

    AngularJS binding variable outside of scope and notify update?

  27. 27

    AngularJS how to dynamically update part of scope with variable

  28. 28

    AngularJS binding variable outside of scope and notify update?

  29. 29

    Angularjs Update Scope variable within setTimeout not working

HotTag

Archive