複数行の文字列を含むJSONファイルでデータを整理しました。このよう :AngularJSとJSON(複数行の場合)
その後[
{
"name": "1. Some Name",
"id": "1",
"description": [
"Some long text 1 ",
"Some long text 2 "
]
},
{
"name": "2. Some Name",
"id": "2",
"description": [
"Some long text 1 ",
"Some long text 2 "
]
}
]
私の見解では、私が説明のテキストを表示したい:
<ion-view view-title="">
<ion-content>
<div class="card">
<div class="item item-text-wrap"
ng-repeat="rule in rules | filter: { id: whichid }">
{{ rule.description }}
</div>
</div>
</ion-content>
そして、このように私の出力を見て:
["Some long text 1","Some long text 2"]
どのように私ができますその文字 '['、 '"'、 '、'?
を削除(またはフィルタリング)します。または私は私が得たNG-バインドのhtml =「rule.description」ディレクティブを使用する場合:(配列である)「」
Some long text 1 ,Some long text 2
は、基本的にはそれは素晴らしい出力されますが、彼らは、カンマが含まれています。
おかげで、その仕事=) –