我正在研究Thinkster.io的角度教程,一直玩到第四章遇到了一个我无法通过的问题。每次我试图运行一个帖子或删除行动,我得到:
TypeError: undefined is not a function
at Object.Post.create (http://localhost:9000/scripts/services/post.js:12:20)
at Scope.$scope.submitPost (http://localhost:9000/scripts/controllers/posts.js:9:10)
at http://localhost:9
在这里我有一个带有ng-click=" remove (item)“按钮的ng-重复列表,该按钮触发一个remove函数:
$scope.remove = function (item) {
console.log(item);
$scope.items.$remove(item);
};
而$scope.items.$remove();可以很好地删除模型中的所有项。我不太清楚如果我传递一个要删除的项目,它为什么要抛给我一个错误。下面是我正在犯的错误。
Error: Firebase.child failed: First argument was an
var myApp = angular.module("myApp", ["firebase"]);
var nick = prompt("Anna nimesi");
myApp.controller("MyController", ["$scope", "$firebaseArray",
function($scope, $firebaseArray) {
var msgref = new Firebase("https://(myapp).firebaseio.co
我有任务的密钥,但当我删除它的同级键时,我似乎无法删除它。当我创建一个任务时,我也会用相同的引用号创建一个重复的任务。我正在为特定的任务设置火基裁判。我做错了什么?
//get user feed
var userRef = new Firebase("https://plnkr.firebaseio.com/users/" + user.uid + '/tasks/');
var userList = $firebase(userRef);
$scope.userList = userList.$
我无法从firebase检索消息,但我无法发送消息,并且没有出现错误。我已经搜索并尝试了所有方法,但无法在我的代码中找到问题。 我的应用组件 import {Component, OnInit} from '@angular/core';
import { AngularFireList, AngularFireDatabase } from
'angularfire2/database';
import { AngularFireAuth } from 'angularfire2/auth';
import * as firebase f
因此,当我尝试从firebase获取数据时,会得到这样的结果
Invalid argument '{"-KCO4lKzEJPRq0QgkfHO":{"description":"teste","id":1457488598401,"resourceUrl":"tete","title":"test2"}}' for pipe 'AsyncPipe' in [listItems | async in ArcListComponent@2
我面临以下问题:
我将一个对象上传到我的firebase,其中一个属性是ArrayList。这就像一个护身符,我将所有的对象及其属性放到我的firebase中。
当我想要检索这个数据时,我得到了以下错误:
com.firebase.client.FirebaseException: Failed to bounce to type
这种情况会发生,因为我无法从Firebase中以ArrayList的形式检索数据,并将其导入到我用于上传的同一类型的对象中。
如何将这些类型的firebase对象使用到java对象中?
非常感谢
I'm using the official documentation here尝试将firebase添加到我的angular应用程序,但我一直收到以下类型错误: ype '{ ngModule: typeof AngularFireModule; providers: { provide: InjectionToken<string | FirebaseAppConfig>; useValue: string | FirebaseAppConfig; }[]; }' is not assignable to type 'any[] | Type
我一直很难尝试通过firebase使用angular来执行关系查询。
var userChallengeRef=new Firebase(FIREBASE_URL+ 'users/'+$rootScope.currentUser.$id+'/mychallenges');
var userChallengeInfo=$firebaseArray(userChallengeRef)
// var log = [];
// var challUserRef=challengesRef
这不是特别的angularjs,而是javascript。我从angularjs和firebase的聊天示例中获取一个过滤器,这就是它的样子。
angular.module('myApp')
.filter('reverse', function () {
function toArray(list) {
var k, out = [];
if( list ) {
if( angular.isArray(list) ) {
out = list;
}
else