blob: 1301ea3f4fea01939bb358d06a2673b07b1de1c0 [file] [log] [blame]
Bri Prebilic Coleeb28b0b2015-01-15 14:20:58 -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/*
18 ONOS GUI -- Remote -- General Purpose Functions
Bri Prebilic Coleeb28b0b2015-01-15 14:20:58 -080019 */
20(function () {
21 'use strict';
22
23 angular.module('onosRemote')
24 .factory('UrlFnService', ['$location', function ($loc) {
25
26 function urlPrefix() {
27 return $loc.protocol() + '://' + $loc.host() + ':' + $loc.port();
28 }
29
30 return {
31 urlPrefix: urlPrefix
32 };
33 }]);
34
35}());