UNPKG

1.17 kBJavaScriptView Raw
1"use strict";
2/**
3 * @hidden
4 */
5var Config = (function () {
6 function Config() {
7 /**
8 * @private
9 */
10 this.urls = {
11 'api': 'https://api.ionic.io',
12 'web': 'https://web.ionic.io'
13 };
14 }
15 /**
16 * Register a new config.
17 */
18 Config.prototype.register = function (settings) {
19 this.settings = settings;
20 };
21 /**
22 * Get a value from the core settings. You should use `settings` attribute
23 * directly for core settings and other settings.
24 *
25 * @deprecated
26 *
27 * @param name - The settings key to get.
28 */
29 Config.prototype.get = function (name) {
30 if (!this.settings || !this.settings.core) {
31 return undefined;
32 }
33 return this.settings.core[name];
34 };
35 /**
36 * @hidden
37 */
38 Config.prototype.getURL = function (name) {
39 var urls = (this.settings && this.settings.core && this.settings.core.urls) || {};
40 if (urls[name]) {
41 return urls[name];
42 }
43 return this.urls[name];
44 };
45 return Config;
46}());
47exports.Config = Config;
48//# sourceMappingURL=config.js.map
\No newline at end of file