Created
May 7, 2016 17:42
-
-
Save SimonDoy/350ade7d3d32bcfa923ed1aba9d0df19 to your computer and use it in GitHub Desktop.
app.js with add and list route
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
'use strict'; | |
var invoiceFormApp = angular.module('itspInvoiceFormApp', | |
[ | |
'ngRoute', 'invoiceControllersModule' | |
]); | |
var appStart = function($routeProvider) { | |
$routeProvider.when('/invoices/add', { | |
templateUrl:'/app/views/add-invoices.html', | |
controller: 'addInvoiceController' | |
}).when('/invoices', { | |
templateUrl:'/app/views/list-invoices.html', | |
controller: 'listInvoicesController' | |
}).otherwise({ | |
redirectTo: '/invoices' | |
}); | |
}; | |
invoiceFormApp.config(['$routeProvider', appStart]); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment