3
var cufe = angular.module('cufeApp', ['ngRoute', 'cufeAppCont'])
    .config(function ($routeProvider) {
        $routeProvider
            .when('/admin', {
                templateUrl: "templates/admin.html"
            })
            .when('/login', {
                templateUrl: "templates/login.html",
                abstract: true,
                controller: "LoginCtrl"
            })
            .when('/qamember', {
                templateUrl: "templates/qamember.html"
                abstract: true
            })
            .otherwise('/login')
    });

In my browser I can direct myself automatically to any of these routes so can I disable them such that any routing like index.html#/admin will be redirected to login unless it's done in a JS script function?

In other words, disable users from seeing pages that aren't intended to them?

1

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.