Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at

  • Jonathan Roberts 306 posts 887 karma points
    Sep 11, 2017 @ 09:53
    Jonathan Roberts

    You have unsaved changes


    I have created a drop down filter control to a custom list view which filters a table of pages depending on the drop down. When I click on a row to open the page details I get the following pop up:

    "You have unsaved changes"

    The only two things that have changed on the page is the option in the Drop Down and the table, neither of which I wish to Save.

    I have put code into the controller such as

    $scope.categoryNames.$dirty = false;

    But this has no effect. I may have put this in the wrong place. Do you know where this should be and would this prevent the pop up from appearing?



  • Ayo Adesina 325 posts 777 karma points
    Sep 13, 2017 @ 08:07
    Ayo Adesina

    Hi Jonathan,

    I'm pretty sure you are on the right track with this. This dialog only shows up when the model is dirty and setting it to false should stop that dialog popping up.

    It is my understanding that, when you change the value of something in your model, even though you don't click save, your model will be dirty this happends as soon as the value is modified.

    Maybe try printing the value of $dirty to the console a few times to try and work out at which point you need to set it to false.

Please Sign in or register to post replies

Write your reply to: