Latest tweaks

This commit is contained in:
Dobie Wollert
2015-08-10 01:42:48 -04:00
parent a8a63651ab
commit a228c2fde0
10 changed files with 37 additions and 35 deletions

View File

@ -94,13 +94,14 @@ function devicesControllerFactory(isEdit) {
function create() {
Devices.create($scope.model, function(result) {
console.log('here');
$location.path("/devices/" + result._id);
$location.path("/clients/" + result.client);
});
}
function update() {
Devices.update({id: $scope.model._id}, $scope.model);
Devices.update({id: $scope.model._id}, $scope.model, function() {
$location.path("/clients/" + $scope.model.client);
});
}
var hashids = new Hashids("biomed");