ronzeidman / ng2-ui-auth-example

MIT License
34 stars 14 forks source link

Where to put Server URL #11

Closed tomNjerry closed 7 years ago

tomNjerry commented 7 years ago

As I came from Satellizer to this, we have '_baseurl' parameter there which tells Satellizer about our local server and post things there for server side validation. Where to put that URL ??

godlovesugly commented 7 years ago

@tomNjerry In this file https://github.com/ronzeidman/ng2-ui-auth-example/blob/master/client/src/config.ts

Do it like this: export class MyAuthConfig extends CustomConfig { defaultHeaders = {'Content-Type': 'application/json'}; baseUrl = env.apiBaseUrl; ... }