blob: 9b27628b98f370d90279ac51b78470fca0d4536c [file] [log] [blame]
Matteo Scandolo5d568612016-01-26 11:02:16 -08001/*
2 * Copyright 2015 Open Networking Laboratory
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17(function () {
Matteo Scandolo0f9b0852016-01-27 13:51:07 -080018 'use strict';
Matteo Scandolo5d568612016-01-26 11:02:16 -080019
Matteo Scandolo0f9b0852016-01-27 13:51:07 -080020 var urlSuffix = '/rs/logout';
Matteo Scandolo5d568612016-01-26 11:02:16 -080021
Matteo Scandolo0f9b0852016-01-27 13:51:07 -080022 angular.module('cordMast', [])
23 .controller('CordMastCtrl', function ($log, $scope, $location, User) {
24 $scope.logout = function () {
25 User.logout()
26 .then(function(){
27 $location.path('/login');
Matteo Scandolo5d568612016-01-26 11:02:16 -080028 });
Matteo Scandolo0f9b0852016-01-27 13:51:07 -080029 };
30 })
31 .directive('mast', function () {
32 return {
33 restrict: 'E',
34 templateUrl: 'app/fw/mast/mast.html'
35 };
36 });
Matteo Scandolo5d568612016-01-26 11:02:16 -080037}());