For Ionic
app.value('config', {
"constant1": "value1",
"constant2": "value2"
});
and access it using
config.constant1
Remember to add a dependency config.
For nativescript
Identify
var configObject = {
testData: false,
apiUrl: "https://www.domain.com/api/v1/"
};
Using
var config = require('../../utils/config');
and get the value
config.apiUrl
Hi
source
share