Open manentea opened 9 years ago
.controller('calendar', ['$scope', '$firebase', function($scope, $firebaseArray){
var firebaseEvents = new Firebase("https://{{FIREBASE URL}}.firebaseio.com/");
var events = $firebaseArray(firebaseEvents);
$scope.newEvent = {
title: '',
start: ''
};
$scope.addEvent = function(){
events.$add($scope.newEvent);
$scope.newEvent = {
title: '',
start: ''
};
}
I'm fairly certain this will work as well
Hey, I found your tutorial and just had a quick question for you.
In these lines here
Because we need an array of events wouldn't it be beneficial to use $firebaseArray since AngularFire provides that as well? Or is there a reason it's done this way?