error : Error: [$parse:syntax] Syntax danger: Token '}' is unexpected, expecting [:] at column 35 of the expression [yourSelectRadio={item.Polarisation}] starting at [}].
http://errors.angularjs.org/1.2.21/$parse/syntax?p0=%7D&p1=is%20unexpected%2C%20expecting%20%5B%3A%5D&p2=35&p3=yourSelectRadio%3D%7Bitem.Polarisation%7D&p4=%7D
我的代碼的35列:語法危險:令牌 '}' 是出乎意料的,希望[:]在表達式[yourSelectRadio = {item.Polarisation}]
<div class="btn-group" ng-init="yourSelectRadio={item.Polarisation}">
<label class="btn btn-success ng-pristine ng-valid" ng-model="yourSelectRadio" btn-radio="'Vertical'">Vertical</label>
<label class="btn btn-success ng-pristine ng-valid" ng-model="yourSelectRadio" btn-radio="'Horizontal'">Horizontal</label>
</div>
爲什麼發生這種錯誤?
'yourSelectRadio = {伊特m.Polarisation}'是無效的javascript。 – 2014-10-08 14:29:10
我該怎麼辦? – 2014-10-08 14:32:07
...使其有效。鑑於無效的JavaScript,我不知道你的意圖是什麼,因此我不能建議如何「修復它」 – 2014-10-08 14:32:34