Copied to clipboard

Flag this post as spam?

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


  • David Peck 690 posts 1896 karma points c-trib
    Dec 10, 2016 @ 07:50
    David Peck
    0

    Dashboard warns about unsaved changes

    I've created a simple dashboard in Angular. It has a textarea and a button. You add a cover to the textarea, click the button, and some data gets updated in the database.

    This is all good until you navigate away and get the unsaved data warning. Clients are easily rattled. How can I get the working properly, or turn it off?

  • Marc Goodson 2149 posts 14377 karma points MVP 9x c-trib
    Dec 10, 2016 @ 09:43
    Marc Goodson
    101

    Hi David

    This warning flags if any angular textboxes etc on the page you are navigating away from are marked as 'dirty' eg content has been added to them not been saved - even on dashboards!

    add the no-dirty-check to your textbox on your dashboard eg

    <input name="searchTerm" type="text" ng-model="searchTerm" no-dirty-check class="col-md-12" />
    

    and the textbox won't trigger the alert when the user navigates away, if something has been typed into it...

    regards

    Marc

Please Sign in or register to post replies

Write your reply to:

Draft