It seems to be working both ways but the documentation says to use get() on observable objects. I prefer the conciseness of the first example with direct invocations. What dangers am I putting myself in by not using get()?
..vs..
Here's how data is initialized:
<
div
data-template
=
"trade-purchase-listing-template1b"
data-bind
=
"source: this"
>
<
script
id
=
"trade-purchase-listing-template1b"
type
=
"text/x-kendo-template"
>
#if (data.current_trade_balance !== null && data.listing.price) {#
#if (data.current_trade_balance >= data.listing.price) {#
..vs..
<
div
data-template
=
"trade-purchase-listing-template1b"
data-bind
=
"source: this"
>
<
script
id
=
"trade-purchase-listing-template1b"
type
=
"text/x-kendo-template"
>
#if (data.get('current_trade_balance') !== null && data.get('listing.price')) {#
#if (data.get('current_trade_balance') >= data.get('listing.price')) {#
Here's how data is initialized:
model.data = kendo.observable({
listing: {},
current_trade_balance:
null
,
....