1

I'm using SystemJsModuleLoader to load modules, it works just fine. But when I test my app, whenStable didn't works as it describes. It resolves so fast that systemjsLoader.load() hasn't resolved yet. So I can't do test in whenStable().then(my test here...).

My questions are:

  1. Why the whenStable doesn't wait the promise resolves? https://plnkr.co/edit/E438ngPcFYkwh48CTUoe?p=preview (VERSION1)
  2. And why the whenStable works just fine when I put the code from onClick to ngOnInit? https://plnkr.co/edit/E438ngPcFYkwh48CTUoe?p=preview (VERSION2)

I have already opened a issue on github, but I don't think this is a <script> ordering problem since I use the example the angular.io provided, and I want to try some luck here.

Elliot Xu
  • 11
  • 1

0 Answers0