angular2-rest icon indicating copy to clipboard operation
angular2-rest copied to clipboard

Set Base URL as string or as function.

Open 0xE282B0 opened this issue 8 years ago • 1 comments

As mentioned in #18 it would be handy to have a configurable BackendURL at execution time.

My preferred approach is to pass the @BaseUrl annotation a function instead of a string.

example:

@BaseUrl(
    _ => sessionStorage.getItem("url") || "http://localhost:8080"
)

0xE282B0 avatar Jun 17 '16 21:06 0xE282B0

The important commit is https://github.com/Paldom/angular2-rest/pull/22/commits/2da6d04dd0803e269e4c64c6a1f6fae79a7d70e1. Feel free to cherry-pick it.

All the other changes have been committed to satisfy Travis CI.

0xE282B0 avatar Jun 17 '16 22:06 0xE282B0