2
私は私のデータは非常に似firebaseに挿入したい挿入されていません。角度ベース。データが正しく
cities:{
Tokyo:{
name: "Tokyo, JP"
}
London:{
name: "London, UK"
}
and so on...
私はオンラインGUIから手動でいくつかのデータを挿入:cities
しかし残念ながら、それがそのように挿入されます:minsk
私のコード
Firebase工場:
export default function CitiesFactory($firebaseArray, Firebase) {
'ngInject';
var ref = new Firebase("https://name.firebaseio.com/");
return $firebaseArray(ref.child('cities'));
}
コントローラ(機能の追加):
$scope.addoras = function(city) {
CitiesFactory.$add({
city: {
name: city
}
}).then(function(CitiesFactory) {
var id = CitiesFactory.key();
console.log('Added Contact ' + id);
$scope.addorasmodel = '';
});
};
誰かが私を助けることができますか?
またhttp://stackoverflow.com/questions/36845390/firebase-help-avoidを見ます-new-id-on-new-push/36846118#36846118 –