Hi David, I interpret the article differently than you. It says that you should never use user input to generate templates, not that you shouldn't watch user input.
-Luke On Wed, Nov 2, 2016, 02:23 David Michael Gang <[email protected]> wrote: > Hi all, > > I read the > http://angularjs.blogspot.co.il/2016/09/angular-16-expression-sandbox-removal.html > which suggests not to watch user provided content. > There is a lack of examples so i want to be sure, if i have an ng-model on > a text input called searchtext, will it be unsafe to watch this variable? > For example in an autocomplete : > Will it be unsafe to write: > $scope.$watch('searchText', wait ? $mdUtil.debounce(handleSearchText, > wait) : handleSearchText); > where searchtext is the ng-model and handlesearchtext brings the results > from the autocomplete server? > > If yes, how can it be written in a safe way? > > BR, > David > > -- > You received this message because you are subscribed to the Google Groups > "Angular" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at https://groups.google.com/group/angular. > For more options, visit https://groups.google.com/d/optout. > -- Lucas Lacroix Computer Scientist Advanced Technology Division, MEDITECH <http://ehr.meditech.com/> 781-774-2293 -- You received this message because you are subscribed to the Google Groups "Angular" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/angular. For more options, visit https://groups.google.com/d/optout.
