View on GitHub

pb.bank

A starter online banking application built with Worklight, Angular and Bluemix services

Download this project as a .zip file Download this project as a tar.gz file

Class: navigation

pb.bank. navigation

This module manages the navigation bar and the login/logout functions
Parameters:
Name Type Description
ui.bootstrap ngModule
Source:

Classes

ChallengeHandler
loginDialog
loginpinDialog

Members

(static) __this

Properties:
Name Type Description
__this object save pointer to this for using it into challenge handler callbacks
Source:

(static) __userLoggedIn

Properties:
Name Type Description
__userLoggedIn boolean flag to keep track if user is logged in
Default Value:
  • false
Source:

(static) __userLogonStatus

Properties:
Name Type Description
__userLogonStatus string
Source:
To Do:
  • not really used inside this code, might help for managing adapter returned status

(static) _activeView

Properties:
Name Type Description
_activeView integer register for the active tab in navbar
Default Value:
  • 0
Source:

(static) userDisplayName

Properties:
Name Type Description
userDisplayName string holds user name to display on navbar once logged in
Source:

Methods

(static) doLogout()

called from navbar to logoff the current user
Source:
To Do:
  • handle logout errors and return accordingly

(static) isLoggedIn(_view) → {boolean}

called to check if the user is logged in returns the value of the __userLoggedIn and calls Worklight to load user display name
Parameters:
Name Type Description
_view int index of view to check
Source:
Returns:
true if user is logged in
Type
boolean

(static) isSelected(_view) → {boolean}

called to check if navbar should render as selected
Parameters:
Name Type Description
_view int index of view to check
Source:
Returns:
true if the passed view is selected
Type
boolean

(static) open()

Instantiate and open the login modal dialog
Source:

(static) open()

Instantiate and open the pin modal dialog
Source:

(static) select(_view)

called when user clicks on a navbar tab, stores new view in _activeview
Parameters:
Name Type Description
_view int index of view to load
Source:

Type Definitions

controller($scope, $rootScope, $modal)

Controller for the navigation module
Parameters:
Name Type Description
$scope service the current scope
$rootScope service the root scope, used for broadcasting down events to the alerts module
$modal service used for displaying the modal dialogs for the login process
Source: