how to consume multiple urls using injection token/App_init concept using angularhow to import .json config to environment.ts and consume api using angularHow do I modify the URL without reloading the page?How can I select an element with multiple classes in jQuery?How to get the browser to navigate to URL in JavaScriptJavaScript/jQuery to download file via POST with JSON dataTrigger callback after getting multiple json files asynchronouslyHow can I get new selection in “select” in Angular 2?In Angular, how do you determine the active route?How to get query params from url in Angular 2?Ionic 3: Using result from JSON response in second GET callhow to import .json config to environment.ts and consume api using angular

Is American Express widely accepted in France?

Is the capacitor drawn or wired wrongly?

What are the problems in teaching guitar via Skype?

How much current can Baofeng UV-5R provide on +V pin?

What is the intuition behind uniform continuity?

How can an eldritch abomination hide its true form in public?

What does War Machine's "Canopy! Canopy!" line mean in "Avengers: Endgame"?

Can I ask a publisher for a paper that I need for reviewing

How can I grammatically understand "Wir über uns"?

How to decline physical affection from a child whose parents are pressuring them?

How was Apollo supposed to rendezvous in the case of a lunar abort?

Select row of data if next row contains zero

Humans meet a distant alien species. How do they standardize? - Units of Measure

What is a simple, physical situation where complex numbers emerge naturally?

Can you please explain this joke: "I'm going bananas is what I tell my bananas before I leave the house"?

Applicants clearly not having the skills they advertise

When was the word "ambigu" first used with the sense of "meal with all items served at the same time"?

Is having a hidden directory under /etc safe?

Can you use a concentration spell while using Mantle of Majesty?

Is there a rule that prohibits us from using 2 possessives in a row?

Opposite of "Squeaky wheel gets the grease"

Coding Challenge Solution - Good Range

How crucial is a waifu game storyline?

Why were the Night's Watch required to be celibate?



how to consume multiple urls using injection token/App_init concept using angular


how to import .json config to environment.ts and consume api using angularHow do I modify the URL without reloading the page?How can I select an element with multiple classes in jQuery?How to get the browser to navigate to URL in JavaScriptJavaScript/jQuery to download file via POST with JSON dataTrigger callback after getting multiple json files asynchronouslyHow can I get new selection in “select” in Angular 2?In Angular, how do you determine the active route?How to get query params from url in Angular 2?Ionic 3: Using result from JSON response in second GET callhow to import .json config to environment.ts and consume api using angular






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








1















here I need a suggestion or better approach related to multi URL consumption
scenario: I have a JSON file in assets folder where it contains multiple URLs like below




"Url1": "http://dummy.restapiexample.com/",
"Url2": "https://reqres.com"
"url3": "https://fakeapi.com"



with using environment.ts or without environment.ts I need to consume these URLs and



how I trying to consume is



consuming a json file to --> config.service.ts -->Setting.service.ts(where each url will have differnt methods basing on url it will call that method) --> dataLayer.service.ts --> some.component.ts



JSON --> config.service.ts (where it loads the json file)
config.service.ts --> settings.service.ts (where it choose which url to be called )



 ex: 
public x()
return url1


public y()
return url2



like above based on a call from dataLayer.service.ts it calls some diff methods

in settings.service.ts --> dataLayer.service.ts



here it calls settings methods like



 public Method1()
this.settings.x()



and this data layer is called using some.compoent.ts



this.datalayer.method1.susbscribe(res => res)


so my point is how can I implement injection token scenario or APP_INITIALIZER










share|improve this question
























  • see this tutorial: intertech.com/Blog/…

    – alt255
    Mar 24 at 11:46











  • this link may help you stackoverflow.com/questions/55285323/…

    – Hien Nguyen
    Mar 24 at 13:55











  • @HienNguyen exactly thank you i will take a look

    – Jibin
    Mar 24 at 15:57


















1















here I need a suggestion or better approach related to multi URL consumption
scenario: I have a JSON file in assets folder where it contains multiple URLs like below




"Url1": "http://dummy.restapiexample.com/",
"Url2": "https://reqres.com"
"url3": "https://fakeapi.com"



with using environment.ts or without environment.ts I need to consume these URLs and



how I trying to consume is



consuming a json file to --> config.service.ts -->Setting.service.ts(where each url will have differnt methods basing on url it will call that method) --> dataLayer.service.ts --> some.component.ts



JSON --> config.service.ts (where it loads the json file)
config.service.ts --> settings.service.ts (where it choose which url to be called )



 ex: 
public x()
return url1


public y()
return url2



like above based on a call from dataLayer.service.ts it calls some diff methods

in settings.service.ts --> dataLayer.service.ts



here it calls settings methods like



 public Method1()
this.settings.x()



and this data layer is called using some.compoent.ts



this.datalayer.method1.susbscribe(res => res)


so my point is how can I implement injection token scenario or APP_INITIALIZER










share|improve this question
























  • see this tutorial: intertech.com/Blog/…

    – alt255
    Mar 24 at 11:46











  • this link may help you stackoverflow.com/questions/55285323/…

    – Hien Nguyen
    Mar 24 at 13:55











  • @HienNguyen exactly thank you i will take a look

    – Jibin
    Mar 24 at 15:57














1












1








1








here I need a suggestion or better approach related to multi URL consumption
scenario: I have a JSON file in assets folder where it contains multiple URLs like below




"Url1": "http://dummy.restapiexample.com/",
"Url2": "https://reqres.com"
"url3": "https://fakeapi.com"



with using environment.ts or without environment.ts I need to consume these URLs and



how I trying to consume is



consuming a json file to --> config.service.ts -->Setting.service.ts(where each url will have differnt methods basing on url it will call that method) --> dataLayer.service.ts --> some.component.ts



JSON --> config.service.ts (where it loads the json file)
config.service.ts --> settings.service.ts (where it choose which url to be called )



 ex: 
public x()
return url1


public y()
return url2



like above based on a call from dataLayer.service.ts it calls some diff methods

in settings.service.ts --> dataLayer.service.ts



here it calls settings methods like



 public Method1()
this.settings.x()



and this data layer is called using some.compoent.ts



this.datalayer.method1.susbscribe(res => res)


so my point is how can I implement injection token scenario or APP_INITIALIZER










share|improve this question
















here I need a suggestion or better approach related to multi URL consumption
scenario: I have a JSON file in assets folder where it contains multiple URLs like below




"Url1": "http://dummy.restapiexample.com/",
"Url2": "https://reqres.com"
"url3": "https://fakeapi.com"



with using environment.ts or without environment.ts I need to consume these URLs and



how I trying to consume is



consuming a json file to --> config.service.ts -->Setting.service.ts(where each url will have differnt methods basing on url it will call that method) --> dataLayer.service.ts --> some.component.ts



JSON --> config.service.ts (where it loads the json file)
config.service.ts --> settings.service.ts (where it choose which url to be called )



 ex: 
public x()
return url1


public y()
return url2



like above based on a call from dataLayer.service.ts it calls some diff methods

in settings.service.ts --> dataLayer.service.ts



here it calls settings methods like



 public Method1()
this.settings.x()



and this data layer is called using some.compoent.ts



this.datalayer.method1.susbscribe(res => res)


so my point is how can I implement injection token scenario or APP_INITIALIZER







javascript angular typescript






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 24 at 10:56









Anusha_Mamidala

1569




1569










asked Mar 24 at 10:36









JibinJibin

64




64












  • see this tutorial: intertech.com/Blog/…

    – alt255
    Mar 24 at 11:46











  • this link may help you stackoverflow.com/questions/55285323/…

    – Hien Nguyen
    Mar 24 at 13:55











  • @HienNguyen exactly thank you i will take a look

    – Jibin
    Mar 24 at 15:57


















  • see this tutorial: intertech.com/Blog/…

    – alt255
    Mar 24 at 11:46











  • this link may help you stackoverflow.com/questions/55285323/…

    – Hien Nguyen
    Mar 24 at 13:55











  • @HienNguyen exactly thank you i will take a look

    – Jibin
    Mar 24 at 15:57

















see this tutorial: intertech.com/Blog/…

– alt255
Mar 24 at 11:46





see this tutorial: intertech.com/Blog/…

– alt255
Mar 24 at 11:46













this link may help you stackoverflow.com/questions/55285323/…

– Hien Nguyen
Mar 24 at 13:55





this link may help you stackoverflow.com/questions/55285323/…

– Hien Nguyen
Mar 24 at 13:55













@HienNguyen exactly thank you i will take a look

– Jibin
Mar 24 at 15:57






@HienNguyen exactly thank you i will take a look

– Jibin
Mar 24 at 15:57













0






active

oldest

votes












Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55322891%2fhow-to-consume-multiple-urls-using-injection-token-app-init-concept-using-angula%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes















draft saved

draft discarded
















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55322891%2fhow-to-consume-multiple-urls-using-injection-token-app-init-concept-using-angula%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

은진 송씨 목차 역사 본관 분파 인물 조선 왕실과의 인척 관계 집성촌 항렬자 인구 같이 보기 각주 둘러보기 메뉴은진 송씨세종실록 149권, 지리지 충청도 공주목 은진현