Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
Miguel Couto
@Mig1st4ck
7 watchers there i o don't see a clear reason of why...
Kent C. Dodds
@kentcdodds
Some of it will be for the two-way bindings between the formly-form and the formly-field
most of it, I should say
Miguel Couto
@Mig1st4ck
this line is formly-field
what i would like to know better is how to track this watchers in a way i can clean the most of it
angular.element($0).data().$scope.$$watchers
gives a list of watchers that don't have any info of where they are bind to
Caleb Kniffen
@ckniffen
@kentcdodds type inheritance
Kent C. Dodds
@kentcdodds
@ckniffen, I love that too :-) You don't go more than 3 (maybe 4) levels though do you?
@Mig1st4ck, nothing that I'm aware of... Next version of Batarang is coming out soon, maybe it'll have more helpful features
Caleb Kniffen
@ckniffen
No I don’t.
jwittwer
@jwittwer
@kentcdodds trying to assign onKeyup to a specific field, but it is getting attached to all fields.
http://jsbin.com/wojikekuza/2/edit?console,output
      {
        key: 'product',
        type: 'input',
        templateOptions: {
          label: 'Product'
        },
        expressionProperties: {
          'templateOptions.onKeyup': function() {
            console.log('keyup handled by Prodcut expression properties!');
          }
        }
      }
Kent C. Dodds
@kentcdodds
@jwittwer, you wont want to put it in expressionProperties
it needs to go in templateOptions
as onKeyup
Caleb Kniffen
@ckniffen
is keyUp not a part of ngModelAttrs?
Kent C. Dodds
@kentcdodds
I believe it is...
Caleb Kniffen
@ckniffen
so then why wouldnt expressionProperties be used?
Kent C. Dodds
@kentcdodds
because it's not something that can be bound (like with {{ }} or ng- expressions)
Caleb Kniffen
@ckniffen
isn’t ng-keyup an expression
Kent C. Dodds
@kentcdodds
ng-keyup is a statement
not an expression
Caleb Kniffen
@ckniffen
oh I now see your point about about renaming it
yeah
In here I call it expression
should be statement

confusing

:point_up: that's what I get for trying to use hashtags in gitter
#confusing
Caleb Kniffen
@ckniffen
so there are three kinds attribute, bound and statement?
bound equates to {{}}? and uses expressionProperties
?
Kent C. Dodds
@kentcdodds
no, it's a little more complex
wish I had time to explain, but we're going to demo in a second and I have a bug or two to squash
Caleb Kniffen
@ckniffen
Thats fine
Kent C. Dodds
@kentcdodds
I think that's my next egghead.io lesson
Caleb Kniffen
@ckniffen
:)
Kent C. Dodds
@kentcdodds
because it's pretty complex, way powerful, very confusing
Benjamin Cabanes
@bcabanes
Hi guys, i have to do an "emptyIfEmpty" validation and i really don't know how to do it. Do you have implemented one?
Kent C. Dodds
@kentcdodds
I'm not sure what "emptyIfEmpty" means...
Benjamin Cabanes
@bcabanes
By emptyIfEmpty i mean:
i have two fields, if the first has a value, and the second hasn't, then the two must be empty
it's like dependent fields that have to be all filled, or all empty.
I don't really sure it is possible with formly, but i ask anyway
Kent C. Dodds
@kentcdodds
It's totally possible (and easy) with formly
I just don't have time to give you an example right now
Benjamin Cabanes
@bcabanes
okay, so this is a good news, an example would be super great! when you'll have time.
Kent C. Dodds
@kentcdodds
I recommend checking out the validation lesson at http://learn.angular-formly.com
Benjamin Cabanes
@bcabanes
yep i already tried that but i mess up with catching another value from the model but i will continue to try.
Ben Orozco
@benoror
you could write a failing jsbin example