Tengo un foreach simple:nocaut propiedad viewmodel indefinido
<div id="customersArea" data-bind="foreach: people">
<div class="section" data-bind="attr: { 'personid': PersonId }" >
<div class="sectionActions">
<div><a class="action" href="#" data-bind='click: $parent.removePerson'>Remove</a></div>
</div>
<div class="sectionText">
<span data-bind="if:LastName, text:LastName"></span>
<span data-bind="if:FirstName, text:FirstName"></span>
<span data-bind="if:MailingAddress">
<span data-bind="with:MailingAddress">
<span data-bind="text:StreetPartOne"> </span>
<span data-bind="text:StreetPartTwo"> </span>
<span data-bind="text:City"></span>
<span data-bind="text:PostalCode"></span>
</span>
</span>
<span data-bind="if:EmailAddress, text:EmailAddress"></span>
<span data-bind="if:MainPhoneNumber, text:MainPhoneNumber"></span>
<span data-bind="if:MobilePhoneNumber, text:MobilePhoneNumber"></span>
</div>
<div class="sectionOptions">
</div>
</div>
</div>
que estoy tratando de hacerlo de tal manera que yo pueda unirse en contra de un modelo {PERSONID: 33} y el resto será simplemente no hacer caso de falta. cuando intento que ésta y otras formas me sale
Uncaught Error: Unable to parse bindings.
Message: ReferenceError: MailingAddress is not defined;
Bindings value: if:MailingAddress
he creado un jsFiddle simple de prueba:
he intentado texto con init con {PERSONID: 33, Apellido: "Frank"} y que doesn 't show lastname ... – maxfridbe
He actualizado el enlace. Necesita ser ligeramente diferente para el enlace de 'texto': http://jsfiddle.net/rniemeyer/dLCL8/4/ –
@RPNiemeyer Gracias por la sugerencia, ¿cómo podemos hacerlo con el enlace "attr"? –