angularjs - Should i use ng-change to save changes to a database record? -
i've been using angularjs build website/business system mum's business. i'm not quite sure best practice bit i'm working on now.
i'm using pdo handle data on database
i need implement option change client details.
i first instinct use ng-change data saves it's changed. i'm not sure if that's best way (think of number of requests have sent when making note. had though of saving changes when user leaves text box, or adding save button.
which way best?... or not matter?
yes correct - using ng-change increase number of requests.
but developers @ google have made sure logic behind ng-change optimised best performance.
check these articles further explanation
http://www.codelord.net/2015/06/11/using-ng-change-instead-of-$watch-in-angular/
Comments
Post a Comment