Where to save settings like API url in Ionic2 app? [duplicate]
问题 This question already has answers here : Ionic2/Angular2 - Read a custom config file (2 answers) Closed 2 years ago . I have several settings which should be in a configuration file. For example: URL of APIs Where is the best place for it in Ionic 2? 回答1: From Angular 2/4 Docs: Non-class dependencies What if the dependency value isn't a class? Sometimes the thing we want to inject is a string, function, or object . Applications often define configuration objects with lots of small facts (like