5 ms·
Can someone elaborate on point 2 about 3rd party JS libraries? How does Angular 2 allow these libraries to work out of box? For example, masonry or Google Maps
by paradite 10y ago
Can someone elaborate on point 2 about 3rd party JS libraries? How does Angular 2 allow these libraries to work out of box? For example, masonry or Google Maps JavaScript SDK.
In Angular 1 the only way to use them without resorting into angular-XYZ libraries is to put them in a directive and use the link function to write all the logic and DOM manipulation. What's different in Angular 2?
- EugeneOZ 10y agoAngular uses Zone.JS for it.
- cybernet 10y agoOp probably mean, that there is no Angular/ outside world barrier ( which often required using $apply function ). >In Angular 1 the only way to use them without resorting into angular-XYZ libraries is to put them in a directive and use the link function to write all the logic and DOM manipulation. What's different in Angular 2? Well, there is no $scope in Angular 2, so there is no need for link function ( which was used for linking scope and DOM)