Open Hotell opened 8 years ago
Would zone.js be required or optional?
Optional of course. Leave the users choose what they want is my motto with this one! :)
To enable it, It would look like within your main.ts
import 'zone.js';
import {enableZones} from 'ng-metadata/upgrade';
enableZones();
Or something like that
Hey, I'm curious about the effort involved. Implementing this would bring you much closer to the angular2 style API by allowing to get rid of $q completely, yeah? Async/await would be possible, then, as well. And since TS 2.1 now emits async/await for ES5, it'd be usable in most projects.
I guess it could break some apps since zone.js will always hook into events. For example, scroll events would automatically be $scope.applying? You'd have to know to pull that out of the zone, yeah?
Sorry, this may not be on the radar, but integrating zone.js into ng1 would be pretty awesome.
this is a must feature for ng-metadata
we need to call time to time
@scope.$applyAsync
when using RxJS 5 and Angular 1 + ngMetadata. If we could integratezone.js
it would done that for us.Once user will switch to hybrid mode ng1/ng2 by including
ng-metadata/upgrade
this would be disabled, because that Zones thingy, will be handled by Angular 2