Hi Michal,
I didn’t look at your code at all, so I might be slightly off here ;)
your second sample is an expression inside an expression. While this is possible,
it will not work by itself.
the first one is just a simple JS variable, that angular can parse in 1 go. It’s more a JavaScript
thing then an angular one.
In JS those two are exactly the same: object.propertyName === object["propertyName"]
Notice how the second variant uses a sting to fetch the propertyName.
this means you can do
var key = 'propertyName'
var result = object[key]
This can be very handy from time to time.
If you have some more questions, just ask!
Regards
Sander
--
You received this message because you are subscribed to a topic in the Google Groups "AngularJS" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/angular/Qn15OWje7m0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to angular+u...@googlegroups.com.
To post to this group, send email to ang...@googlegroups.com.
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.
Michał Kocztorz
Skype ID: michal_kocztorz
Polcode SA
ul. Hoża 13, 00-528 Warszawa
Spółka zarejestrowana w Sądzie Rejonowym dla m.st. Warszawy XII, Wydział Gospodarczy KRS pod numerem 0000482235, NIP PL 701-021-72-88, o kapitale zakładowym 300.000 zł, wpłaconym w całości.
--
You received this message because you are subscribed to a topic in the Google Groups "AngularJS" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/angular/Qn15OWje7m0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to angular+u...@googlegroups.com.
To post to this group, send email to ang...@googlegroups.com.
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.