Quantcast
Channel: Ember.JS - Latest topics
Viewing all articles
Browse latest Browse all 4838

Adapter in ember

$
0
0

@amanMalhotra wrote:

Hi All,

I am stuck at setting host url in adapter. Which of below will not affect the performance ?

Problem- A web page is written in ember which show data from a service depending upon “type of user” , say USER A and USER B.

For USER A , every functionality is up and running. However, for USER B we need show data from another web service(to be implemented-functionality is same).

Question : Can we assign HOST URL in adapter file depending upon type of user ? For example:

if(USER A){ const dummyHost = “xyz.abc” || “ABC”;

} else{ _ const dummyHost = “xyz.pqr” || “PQR”; _

}

_ host: get(globalVar, dummyHost),_

Or should we do it in component ? for that we need to create a need adapter file and mapping it.

Any more suggestion??/

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 4838

Trending Articles