angular - Angular2: Define a global variable and use it across the application -


in angular 2 application, in index.html, getting logged in user information parent application.

var userid = parent.window.userid  

i need append user id api calls. can define property globally , assign value here.


Comments

Popular posts from this blog

How to understand 2 main() functions after using uftrace to profile the C++ program? -

c# - Update a combobox from a presenter (MVP) -

How to put a lock and transaction on table using spring 4 or above using jdbcTemplate and annotations like @Transactional? -