angularjs - Auto focus on latest input element -


I was developing a module where I need to manually create some text input (on entry or on the button) Clicking) and input after immediately adding it to the Auto Focus list. So far the function works, but when I open the console log, then the $ progressive digest error appears beforehand is strange but if I delete some $ eval or $ then the code works Will not

Here is my plnk demo for your reference:

  function keyEnter ($ document) {return (limited: "A", scope: false, link: function ( Radius, elephant, ethers) {ele.bind ("keydown keypress", function (event) {if (event.which === 13) {radius $ applied (function () (scope. $ Eval (attrs.keyEnter) ;}}};}}}};}}} Custom_outofocus function {return: 'A', link: function (region, element, ethers) {radius. $ Clock (function () {return area. $ Eval (attrs.customAutofocus);}, function (NewValue) {if (newValue === true) {element [0]. ();}}};}};}  

I followed the auto focus on this, it does not show any error, even if I applied the same logic. Is that I am using an angle of 1.3 while its 1.2 is

What should I do to improve the code to avoid those $ digest errors?

Code> function custom font ($ timed T) {return: Restrict: 'A', link: function (scope, element, etter) {// it runs only after the ribber is created only / once element, so I try to focus only once When I do this Digest cycle! $ Timeout (function () {// Use a timeout to focus outside of this digest cycle! Element [0]. Focus (); // Focus Focus instead of autofocus attribute to avoid cross browser problem Use AutoFocus and mark only an element to focus on loading the page.}, 0); }}; }

This uses how the angular works.


Comments

Popular posts from this blog

winforms - C# Form - Property Change -

c# - NewtonSoft JArray - how to select multiple elements with LINQ -

javascript - amcharts makechart not working -