angularjs - Angular in chrome auto-firing ng-click -


i think i'm losing mind

i'm working on medium-large angular app. came in , rebooted morning , angular seems executing every ng-click function when state loads (i'm using $stateprovider). not happening yesterday.

doesn't happen in canary, or ie, or ff.. vanilla chrome (i'm on 43.0.2357.124 m)

if step out of 1 of ng-click calls dumps me angular.js:10555

functioncall: function(fn, contextgetter) {     var argsfn = [];     if (this.peektoken().text !== ')') {       {         argsfn.push(this.expression());       } while (this.expect(','));     }     this.consume(')');      var parser = this;      return function(scope, locals) {       var args = [];       var context = contextgetter ? contextgetter(scope, locals) : scope;        (var = 0; < argsfn.length; i++) {         args.push(argsfn[i](scope, locals));       }       var fnptr = fn(scope, locals, context) || noop;        ensuresafeobject(context, parser.text);       ensuresafeobject(fnptr, parser.text);        // ie stupidity! (ie doesn't have apply native functions)  //vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvright herevvvvvvvvvvvvvvvvvvvvvvvvvvvvv       var v = fnptr.apply             ? fnptr.apply(context, args)             : fnptr(args[0], args[1], args[2], args[3], args[4]); //^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^right here^^^^^^^^^^^^^^^^^^^^^^^^^^^^        return ensuresafeobject(v, parser.text);     };   } 

(since problem in chrome it's hitting fnptr.apply(context, args) running ng-clicks)

once it's loaded way, works expected. it's though when links ng-clicks it's executing them!

it's 'running' ng-clicks in every scope. both in 'master controller' down directives in whichever state i've loaded (it makes datepickers go absolutely nuts)

going , forth between scopes doesn't re-fire ng-clicks weren't cleaned (nav bar buttons instance). new elements load susceptible.

i undid changes far enough i'm sure weird did should gone.

i'm going poke around few hours try re-create in minimal example, i'm hoping it's chrome-update (although none of other angular apps having problem :/ )


my impression functioncall method above should running, , returning function that'll called when click, it's executing 'linking' later executing.


update #1 - stuck console.log in above function spit out trying parse out

ok, in canary (and assume ff , ie): non-click-y angular-y things run through above functioncall function (like

<button title="{{'edit '+mycoolname.replace('_', ')}}"... </button> 

buut, in chrome: above , ng-clicks getting run through function.

loaded: bttypename.replace('', ' ')
loaded: ((!newmodel.author) ? "create new " : ("edit "+newmodel.author+"'s ")) + bttypename.replace('
', ' ')
loaded: bttypename.replace('', ' ')
loaded: ((!newmodel.author) ? "create new " : ("edit "+newmodel.author+"'s ")) + bttypename.replace('
', ' ')
loaded: openreports(); <---- shouldn't here :o

sweet lord figured out.

angularjs batarang released new update , killed everything. removed , everything's new (good old?) anyways...

looks version: 0.8.0 released yesterday (6/18/15) responsible.

i filed issue in github, https://github.com/angular/angularjs-batarang/issues/227


Comments

Popular posts from this blog

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -