Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
U
ulakbus-ui
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ulakbus
ulakbus-ui
Commits
af5caef6
Commit
af5caef6
authored
May 12, 2015
by
Evren Kutar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
clean up the mess
parent
ea214813
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
10 deletions
+4
-10
app.js
app/app.js
+4
-10
No files found.
app/app.js
View file @
af5caef6
'use strict'
;
'use strict'
;
// Declare app level module which depends on views, and components
// Declare app level module which depends on views, and components
angular
.
module
(
'zaerp'
,
[
angular
.
module
(
'zaerp'
,
[
'ngRoute'
,
'zaerp.login'
,
'zaerp.view2'
,
'zaerp.version'
,
'schemaForm'
]).
'ngRoute'
,
'zaerp.login'
,
'zaerp.view2'
,
'zaerp.version'
,
'schemaForm'
]).
config
([
'$routeProvider'
,
function
(
$routeProvider
)
{
config
([
'$routeProvider'
,
function
(
$routeProvider
)
{
console
.
log
(
"redirect to login"
);
console
.
log
(
"redirect to login"
);
$routeProvider
.
otherwise
({
redirectTo
:
'/view2'
});
$routeProvider
.
otherwise
({
redirectTo
:
'/view2'
});
}]).
}]).
run
(
function
(
$rootScope
,
$location
)
{
run
(
function
(
$rootScope
,
$location
)
{
$rootScope
.
$on
(
"$routeChangeStart"
,
function
(
event
,
next
,
current
)
{
$rootScope
.
$on
(
"$routeChangeStart"
,
function
(
event
,
next
,
current
)
{
if
(
$rootScope
.
loggedInUser
==
null
)
{
if
(
$rootScope
.
loggedInUser
==
null
)
{
// no logged user, redirect to /login
// no logged user, redirect to /login
console
.
log
(
"test log"
);
console
.
log
(
"test log"
);
if
(
next
.
templateUrl
===
"login/login.html"
)
{
if
(
next
.
templateUrl
===
"login/login.html"
)
{
console
.
log
(
"test log to login"
);
console
.
log
(
"test log to login"
);
}
else
{
}
else
{
console
.
log
(
"test log logged"
);
console
.
log
(
"test log logged"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment