對象裏面我已經得到了保存在我的數據庫Angularjs字符串轉換爲NG-重複
{"first_name":"Alex","last_name":"Hoffman"}
我加載它作爲對象爲範圍的一部分,然後通過它與NG-重複的字符串。在範圍內的其他值都只是字符串
{"id":"38","fullname":"{\"first_name\":\"Alex\",\"last_name\":\"Hoffman\"}","email":"[email protected]","photo":"img.png"}
但我想用NG重複內NG重複獲得的姓和名分開
<div ng-repeat="customer in customers">
<div class="user-info" ng-repeat="name in customer.fullname">
{{ name.first_name }} {{ name.last_name }}
</div>
</div>
,我什麼也沒得到。我認爲,問題在於,全名值是一個字符串。是否有可能將其轉換爲對象?
是的,這工作...但我認爲在PDO querry或SQL中有一些問題...我不明白,爲什麼我把它作爲一個字符串。將嘗試解決它。如果沒有 - 堅持你的建議 – Sobakinet
很高興能幫到你:D –