External promises don't trigger Angular2 change detection (UPDATE: they do)
<p>I'm working on an <a href="http://electron.atom.io" rel="nofollow noreferrer">electron</a> application, whose client side is written in <a href="https://angular.io" rel="nofollow noreferrer">Angular2</a>. </p>

<p>I'm having the classic problem that a lot of people have encountered (eg. <a href="https://stackoverflow.com/questions/34592857/view-is-not-updated-on-change-in-angular2">here</a> and <a href="https://stackoverflow.com/questions/31706948/angular2-view-not-changing-after-data-is-updated?rq=1">here</a>), namely that I'm updating my component's data, but the view doesn't get updated because Angular doesn't know that the data has changed. The solutions people suggest (see above and also <a href="https://stackoverflow.com/questions/34827334/triggering-angular2-change-detection-manually">here</a>) is to manually run change detection, either on the whole component tree, or part of it (similar to Angular 1's <code>$rootScope.$digest</code> and <code>$scope.$digest</code>).</p>

<p>However, I'd like to avoid wrapping all my data changes in <code>zone.run()</code> calls, as it slightly defeats the purpose of using Angular.</p>

<p>I'm pretty sure I know why this happens: I'm creating Bluebird Promises outside of Angular, in electron code (ie, the <a href="https://github.com/electron/electron/blob/master/docs/tutorial/quick-start.md" rel="nofollow noreferrer">main process</a>), and these aren't Zone aware, so they don't notify Angular of the changes.</p>

<p>I don't know how to solve it, though. What can I do to create Zone aware promises in my electron code, to avoid having to manually run change detection all the time? Can I convert my Bluebird Promises to Zone aware Promises somehow?</p>

<p><del><strong>EDIT</strong>: I think I was wrong, Bluebird promises aren't Zone aware even if created within angular. They're just not Zone aware in general.</del></p>

<p><strong>EDIT 2</strong>: I was completely wrong in the previous edit. Bluebird promises work just fine with zones. However, in the context of an electron application, creating a promise in the <em>main</em> electron process and using it in the <em>renderer</em> process (where Angular lives), doesn't work, as the returned promise isn't zone-aware. Creating the promise from Angular code worked. </p>