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
b31ede29
Commit
b31ede29
authored
Jun 17, 2015
by
Evren Kutar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
get model form submit right way
parent
f81f7692
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
5 deletions
+4
-5
app_routes.js
app/app_routes.js
+1
-1
auth_controller.js
app/components/auth/auth_controller.js
+1
-2
auth_service.js
app/components/auth/auth_service.js
+2
-2
No files found.
app/app_routes.js
View file @
b31ede29
app
.
config
([
'$routeProvider'
,
function
(
$routeProvider
)
{
$routeProvider
.
when
(
'/login'
,
{
templateUrl
:
'components/
login
/login.html'
,
templateUrl
:
'components/
auth
/login.html'
,
controller
:
'LoginCtrl'
,
resolve
:
{
loadMyCtrl
:
[
'$ocLazyLoad'
,
function
(
$ocLazyLoad
)
{
...
...
app/components/auth/auth_controller.js
View file @
b31ede29
...
...
@@ -78,8 +78,7 @@ auth.controller('LoginCtrl', function ($scope, $q, $timeout, LoginService) {
$scope
.
onSubmit
=
function
(
form
)
{
$scope
.
$broadcast
(
'schemaFormValidate'
);
if
(
form
.
$valid
)
{
var
credentials
=
{
email
:
form
.
email
.
$modelValue
,
password
:
form
.
password
.
$modelValue
};
LoginService
.
login
(
credentials
);
LoginService
.
login
(
$scope
.
model
);
}
else
{
console
.
log
(
"not valid"
);
...
...
app/components/auth/auth_service.js
View file @
b31ede29
...
...
@@ -9,7 +9,7 @@
// TODO: login url change with correct one
login
.
factory
(
'LoginService'
,
function
(
$http
,
$rootScope
,
$location
,
$log
,
$cookies
,
Session
,
RESTURL
)
{
auth
.
factory
(
'LoginService'
,
function
(
$http
,
$rootScope
,
$location
,
$log
,
$cookies
,
Session
,
RESTURL
)
{
var
loginService
=
{};
loginService
.
login
=
function
(
credentials
)
{
...
...
@@ -58,7 +58,7 @@ login.factory('LoginService', function ($http, $rootScope, $location, $log, $coo
// TODO: initial service not working!!
login
.
service
(
'Session'
,
function
()
{
auth
.
service
(
'Session'
,
function
()
{
this
.
create
=
function
(
sessionId
,
userId
,
userRole
)
{
this
.
id
=
sessionId
;
this
.
userId
=
userId
;
...
...
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