Angularjs (material) - Refreshing Data In Md-list After Adding New Object Using Md-dialog
I'm fairly new to the whole Angular world, but yesterday I ran into a problem I cannot seem to fix. As a prototype I'm creating a simple Task application which enables the user to
Solution 1:
you are pushing the task into tasks list in wrong scope.
following should do the work for you. while showing dialog.
$mdDialog.show({
controller: TaskController,
templateUrl: 'taskdialog.tmpl.html',
parent: angular.element(document.body),
targetEvent: ev,
}).then(function(task){
$scope.tasks.push(task);
});
while hiding dialog.
$mdDialog.hide(task);
Post a Comment for "Angularjs (material) - Refreshing Data In Md-list After Adding New Object Using Md-dialog"