'use strict'

app.controller('TaskController', function($scope, FURL, $firebase, $location, $routeParams, toaster) {

	var ref = new Firebase(FURL);
	var fbTasks = $firebase(ref.child('tasks')).$asArray();
	var taskId = $routeParams.taskId;

	if(taskId) {
		$scope.selectedTask = getTask(taskId);
	}

	function getTask(taskId) {
		return $firebase(ref.child('tasks').child(taskId)).$asObject();
	}

	$scope.updateTask = function(task) {
		$scope.selectedTask.$save(task);
		toaster.pop('succes', "Task is updated.");
		$location.path('/browse');
	}

	$scope.tasks = fbTasks;

	$scope.postTask = function(task) {
		fbTasks.$add(task);
		$location.path('/browse');
	}
});
@@ -627,16 +627,61 @@
 (task);%0A
+%09%09toaster.pop('succes', %22Task is created.%22);%0A
 %09%09$locat

add toaster notification in task.js