Join the Stack Overflow Community
Stack Overflow is a community of 6.8 million programmers, just like you, helping each other.
Join them; it only takes a minute:
Sign up

I have a problem where I make a single post to a controller from my Angular2 application (today's release), but the controller itself executes twice.

I've tried looking for places where the App Component is executed twice during startup but I can't see anywhere where that might be happening.

I have an otherwise fully functioning VS2015 sample application with Angular2 RTW and MVC webapi, which I have put on github here: https://github.com/tonywr71/Snazzle

Any ideas why it might be double executing? I put console log statements in strategic spots, but even they don't get executed twice!

Any ideas?

share|improve this question
    
ok, I have tracked it down to my HttpInterceptor. I created an interceptor to manage authentication failures and redirect to a home page. Unfortunately, because the subscribe appears to be executed twice, it also executes the controller twice. Not sure how to get around that. – tone Sep 16 '16 at 8:44

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.