var app = angular.module("myApp", ["ngRoute"])
.config(function($routeProvider){
$routeProvider.when('/addExpense', {
templateUrl: 'addExpense.html',
controller: 'addExpenseCtrl'
});
$routeProvider.when('/addIncome', {
templateUrl: 'addIncome.html',
controller: 'addIncomeCtrl'
});
$routeProvider.when('/editExpense', {
templateUrl: 'editExpense.html',
controller: 'editExpenseCtrl'
});
$routeProvider.otherwise({
templateUrl: "index.html"
});
});
app.controller("entryCtrl", function($scope){
$scope.list = [ { date: "2015/01/01", detail: "Bought new wallet", amount: "150,00" },
{ date: "2015/01/08", detail: "Bought shoes", amount: "150,00" },
{ date: "2015/01/12", detail: "Bought shirt", amount: "150,00" },
{ date: "2015/01/12", detail: "Paid electricity bill", amount: "150,00" },
{ date: "2015/01/15", detail: "Paid phone account", amount: "150,00" }
];
$scope.addExpense = function(){
alert("Add Expense");
}
$scope.addIncome = function(){
alert("Add Income");
}
$scope.editExpense = function(){
alert("Edit Expense");
}
});
app.controller("addExpenseCtrl", function($scope){
});
app.controller("addIncomeCtrl", function($scope){
});
app.controller("editExpenseCtrl", function($scope){
});