Skip to content

Instantly share code, notes, and snippets.

@SimonDoy
Created May 7, 2016 17:42
Embed
What would you like to do?
app.js with add and list route
'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