3     Copyright 2016-2017, Huawei Technologies Co., Ltd.
 
   5     Licensed under the Apache License, Version 2.0 (the "License");
 
   6     you may not use this file except in compliance with the License.
 
   7     You may obtain a copy of the License at
 
   9             http://www.apache.org/licenses/LICENSE-2.0
 
  11     Unless required by applicable law or agreed to in writing, software
 
  12     distributed under the License is distributed on an "AS IS" BASIS,
 
  13     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 
  14     See the License for the specific language governing permissions and
 
  15     limitations under the License.
 
  23         * @name app.controller:LayoutCtrl
 
  26         * Controller of the app
 
  31                 .controller('LayoutCtrl', Layout);
 
  33         Layout.$inject = ['$mdSidenav', '$cookies', '$state', '$mdToast', '$mdDialog'];
 
  37         * Using function declarations
 
  38         * and bindable members up top.
 
  41         function Layout($mdSidenav, $cookies, $state, $mdToast, $mdDialog ) {
 
  42                 /*jshint validthis: true */
 
  45                 vm.toggleSidenav = function (menuId) {
 
  46                         $mdSidenav(menuId).toggle();
 
  49                 vm.changePassword = function () {
 
  52                                 .content('Password clicked!')
 
  53                                 .position('top right')
 
  58                 vm.changeProfile = function (ev) {
 
  60                                 controller: DialogController,
 
  61                                 templateUrl: 'tabDialog.tmpl.html',
 
  62                                 parent: angular.element(document.body),
 
  64                                 clickOutsideToClose:true
 
  66                         .then(function(answer) {
 
  69                                         .content('You said the information was "' + answer + '".')
 
  70                                         .position('top right')
 
  77                                         .content('You cancelled the dialog.')
 
  78                                         .position('top right')
 
  83                         function DialogController($scope, $mdDialog) {
 
  84                                 $scope.hide = function() {
 
  88                                 $scope.cancel = function() {
 
  92                                 $scope.answer = function(answer) {
 
  93                                         $mdDialog.hide(answer);
 
  99                 vm.logOut = function () {
 
 101                         alert('Implement your Function Here');
 
 102                         // $cookies.put('dev_appserver_login', ' ');
 
 103                         //$state.go('out', {}, {reload: true});
 
 108                 vm.openMenu = function ($mdOpenMenu, ev) {