blob: 279ab4f77cd11a39a47a657187a018b636808390 [file] [log] [blame]
Bri Prebilic Colee0311892015-05-15 11:27:15 -07001/*
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 () {
18 'use strict';
Bri Prebilic Cole0e371dc2015-06-05 16:47:21 -070019 var urlSuffix = '/rs/login';
Bri Prebilic Colee0311892015-05-15 11:27:15 -070020
21 angular.module('cordLogin', [])
Bri Prebilic Cole0e371dc2015-06-05 16:47:21 -070022 .controller('CordLoginCtrl', ['$log', '$scope', '$resource',
23 function ($log, $scope, $resource) {
24 var LoginData, resource;
25 $scope.page.curr = 'login';
26
27 $scope.login = function () {
28 var email;
29 if (!$scope.email) {
30 email = 'mom@user.org';
31 } else {
32 email = $scope.email
33 }
34 LoginData = $resource($scope.shared.url + urlSuffix + '/' + email);
35 resource = LoginData.get();
36 };
37
38 $log.debug('Cord Login Ctrl has been created.');
Bri Prebilic Colee0311892015-05-15 11:27:15 -070039 }]);
40}());