angular2-dart

Dart Component: How to return result of asynchronous callback?

巧了我就是萌 提交于 2020-01-15 07:30:09
问题 Hey there I am quite new to Dart Futures and I have the following situation. Whenever a user types a letter in the UI the addressChanged() method in my ui_component is called. This method calls the method getProposals() in my maps componenet which does an asynchronous request to the google maps API. As soon as the results are here I want to return them to the UI Component which is going to populate the propasals dropdown in the UI. I am stuck with the last step: How (and whats the best way)

Angular 2 Dart: How to detect click on everything but element?

点点圈 提交于 2019-12-01 05:14:54
On an app with a lot of different components within one component I have a custom Auto-suggest box. The box should be closed if the user clicks anywhere but on the Auto-suggest box (or containing elements of the auto-suggest box). This is what I would do in jQuery: $(document).on('click','body',function(e) { if(e.target!='.suggestbox' && $(e.target).parent('.suggestbox').length <1 ) { $('.suggestbox').remove(); } }); However In my Angular Dart templates I have: index.html: <body> <my-app> // sub component // sub sub component </my-app> </body> I can think of a possibility in detecting a click

Angular 2 Dart: How to detect click on everything but element?

不想你离开。 提交于 2019-12-01 03:20:30
问题 On an app with a lot of different components within one component I have a custom Auto-suggest box. The box should be closed if the user clicks anywhere but on the Auto-suggest box (or containing elements of the auto-suggest box). This is what I would do in jQuery: $(document).on('click','body',function(e) { if(e.target!='.suggestbox' && $(e.target).parent('.suggestbox').length <1 ) { $('.suggestbox').remove(); } }); However In my Angular Dart templates I have: index.html: <body> <my-app> //