Building the admin section for CRUD operations

We will now look to build the admin section of our CMS using Angular JS. The AngularJS app will talk to the backend ExpressJS scripts that we just wrote in the preceding section.

Creating the routes for the admin section

Ideally, we would like our admin section to be called from within the admin URL, so let's go ahead and add the routes for the admin section of the AngularJS app.

Add the following routes to the angcms/public/js/app.js file:

config(['$routeProvider', '$locationProvider', function($routeProvider, $locationProvider) { $routeProvider.when('/admin/login', { templateUrl: 'partials/admin/login.html', controller: 'AdminLoginCtrl' }); $routeProvider.when('/admin/pages', { templateUrl: 'partials/admin/pages.html', ...

Get AngularJS Web Application Development Blueprints now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.