0
JS的火力地堡冗餘存儲離子+數據
<ion-pane view-title="goal">
<ion-header-bar class="bar-positive">
<div class="buttons">
<a nav-transition="android" class="button button-icon icon ion-arrow-left-b" ng-click="" href="#/index"></a>
</div>
<h1 class="title">Add New Goal</h1>
</ion-header-bar>
<ion-content class="padding has-header has-footer" scroll="false" >
<div class="list">
<label class="item item-input">
<input type="text" placeholder="#Title" ng-model="goals.gTitle">
</label>
<label class="item item-input">
<span class="hashtag-title">#{{goals.gTitle}}</span>
</label>
<label class="item item-input">
<textarea placeholder="Goal" ng-model="goals.gDescription"></textarea>
</label>
</div>
</ion-content>
<ion-tabs class="tabs-icon-top tabs-color-active-positive">
<button class="button button-positive button-bar no-round-corner" ng-click="addNewGoal(goals)">Add Goal</button>
</ion-tabs>
</ion-pane>
會發生什麼變化火力是這樣的:
[id]
name: "value1"
[id2]
0
name: "value1"
name2: "value2"
[id3]
0
name: "value1"
1
name2: "value2"
name3: "value3"
因爲它增加了新的數據......它在它之前獲取數據,然後將其添加到新的數據......它現在在整個Firebase存儲中都有冗餘值。 。
謝謝......它現在工作!現在下一個問題是如何獲取數據... -_- –