moxie-lean / ng-patternlab

Atomic Design Patternlab in Angular for use with the LEAN Ecosystem
http://getmoxied.net/lean
MIT License
0 stars 1 forks source link

Admin bar component is doing multiple HTTP requests #83

Closed mitogh closed 7 years ago

mitogh commented 7 years ago

Steps to reproduce and a minimal demo of the problem

Open the Chrome Inspector tool on the, Network tab.

Current behavior

The admin bar component is doing 3 requests.

Expected/desired behavior

Admin bar should do only one XHR request since the other 2 are not required

Other information

screen shot 2016-06-14 at 12 15 55 pm
adamf321 commented 7 years ago

this will fix it: https://github.com/moxie-lean/ng-web-app/issues/63 (at least patch it up, there may be an actual issue causing it to make 3 calls)

mitogh commented 7 years ago

I think the problem is a logic issue that creates 3 calls to the same APi. The cache willl still do 3 requests one to the API and 2 to the cache. So the main thing I guess is debug the component in order to just do one requests. Since this is happening on every page you visit so even if we use the cache as I mentioned before I think we are still experience the same problem.

adamf321 commented 7 years ago

Yes, agreed there's an issue. The cache would mask it, but not fix it.