Commit af5caef6 authored by Evren Kutar's avatar Evren Kutar

clean up the mess

parent ea214813
'use strict';
// Declare app level module which depends on views, and components
angular.module('zaerp', [
'ngRoute',
'zaerp.login',
'zaerp.view2',
'zaerp.version',
'schemaForm'
]).
angular.module('zaerp', ['ngRoute', 'zaerp.login', 'zaerp.view2', 'zaerp.version', 'schemaForm']).
config(['$routeProvider', function ($routeProvider) {
console.log("redirect to login");
$routeProvider.otherwise({redirectTo: '/view2'});
}]).
run(function($rootScope, $location) {
$rootScope.$on( "$routeChangeStart", function(event, next, current) {
run(function ($rootScope, $location) {
$rootScope.$on("$routeChangeStart", function (event, next, current) {
if ($rootScope.loggedInUser == null) {
// no logged user, redirect to /login
console.log("test log");
if ( next.templateUrl === "login/login.html") {
if (next.templateUrl === "login/login.html") {
console.log("test log to login");
} else {
console.log("test log logged");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment