Perhaps instead of using a global you could set this as a property of the app: `this.searchApiEndpoint`