Created
May 8, 2016 12:31
-
-
Save SimonDoy/8e7b90c7029897d74049c330d80adb6d to your computer and use it in GitHub Desktop.
Invoice Controllers, "addInvoiceController"
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
invoiceControllersModule.controller('addInvoiceController', ['$scope', 'dataModelService', '$location', function($scope, dataModelService, $location){ | |
$scope.invoice=new dataModelService.Invoice(); | |
$scope.addInvoiceLine = function addInvoiceLine() { | |
var newInvoiceLine=new dataModelService.InvoiceLine(); | |
$scope.invoice.invoiceLines.push(newInvoiceLine); | |
} | |
$scope.cancel = function cancelStub(){ | |
$location.path('/'); | |
} | |
$scope.status = ""; | |
$scope.error=""; | |
$scope.saveInvoice = function saveInvoiceStub(){ | |
$scope.status="Successfully Saved Invoice"; | |
$location.path("#"); | |
return true; | |
}; | |
}]); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment