![](/img/trans.png)
[英]Angular 2 Dart: How to detect click on everything but element?
在一個組件中包含許多不同組件的應用程序中,我有一個自定義自動建議框。 如果用戶點擊自動建議框(或包含自動建議框的元素)的任何位置,則應關閉該框。 這就是我在jQuery中要做的事情: 但是在我的Angular Dart模板中,我有: index.html的: 我可以 ...
[英]Angular 2 Dart: How to detect click on everything but element?
在一個組件中包含許多不同組件的應用程序中,我有一個自定義自動建議框。 如果用戶點擊自動建議框(或包含自動建議框的元素)的任何位置,則應關閉該框。 這就是我在jQuery中要做的事情: 但是在我的Angular Dart模板中,我有: index.html的: 我可以 ...
[英]Angular 2 Dart: How to share variables between parent with router and child components?
如果讓子組件與路由器一起使用並通過綁定更新它們,我如何共享變量? 這是我的代碼(的一部分): app_component.dart: app_component.html: login_component.dart: profile_component.dar ...
[英]Angular 2 Dart: How to select and change element in an imported sub-component?
以下angular / dart庫( https://pub.dartlang.org/packages/pikaday_datepicker_angular2 )似乎寫得不太好,因為無法設置日期的外部更改(沒有設置器-我只能在開始時設置默認的日期/日期,但如果更改了externallay,則不 ...
[英]is there a way lazy load a component in angular 2 dart?
我有一個組件,該組件使用帶有ngIf語句的另一個組件。 我只想在ngIf計算結果為true時加載第二個組件。 編輯:找到了幾乎可以做我需要的文章: https : //medium.com/@matanlurey/lazy-loading-with-angular-dart-14f580 ...
[英]Angular 2 Dart: How to add body class from inside component?
我的Angular 2 Dart應用程序有許多嵌套組件。 如果我的某個組件的某個屬性設置為true,則會顯示一個彈出窗口。 如果顯示此彈出窗口,我想向文檔正文添加一個類。 偽代碼示例: 原因很簡單:如果顯示彈出組件,我想禁用正文滾動( overflow-x:hidden; ...
[英]Angular 2 Dart: Template syntax - how to concatenate strings?
感覺像一個愚蠢的問題,但我不明白。 如何在Angular 2 Dart模板中進行快速字符串連接? 我的組件有一個單獨的html文件,讓我們說my_component.html : 作品: 作品: 不起作用: 不起作用: 試圖在這里的文檔中找到答案( ...
[英]Using IntelliJ IDEA and the Dart plugin, where does the Dart exceptions end up?
我一直在使用IntelliJ IDEA(2016.3.5)和最新的Dart插件玩Angular2,我無法弄清楚錯誤,異常,斷言失敗等的結果。 我正在使用DART_FLAGS="--checked"運行Dartium,並且pub serve似乎默認為調試模式,據我所知。 Dart2js也配 ...
[英]Angular 2 Dart Template syntax: How to access static methods?
有沒有辦法從Dart中的模板訪問靜態方法? 問題如下: offer.dart: 第一次嘗試: main_component.html: 例外: 例外:NoSuchMethodError:類“要約”沒有實例方法“ getPriceString”。 接收 ...
[英]form control inside ngIf is still invalidating the whole form
我有一個使用控件進行驗證的輸入組件。 該組件正在帶有ngIf的標簽中使用。 當ngIf為false時,不呈現輸入,這是預期的結果,但是,問題在於它仍然使整個表單無效。 我該怎么辦,以使該表單不會被錯誤的ngIf語句內的輸入所無效。 謝謝 ...
[英]Dart Component: How to return result of asynchronous callback?
嘿,我對Dart Futures還是陌生的,我有以下情況。 每當用戶在UI中addressChanged()字母時,都會調用ui_component中的addressChanged()方法。 此方法在我的地圖componenet中調用方法getProposals() ,該方法向googl ...
[英]Angular2-Dart PathLocationStrategy
使用HashLocationStrategy刷新angular2飛鏢頁面的效果很好,因為它可以打開完全相同的視圖。 使用PathLocationStrategy刷新頁面-Tomcat服務器配置為服務index.html-適用於不帶參數的url,但不適用於不帶參數的url。 本地主機: ...
[英]Angular 2/Dart: Binding multiple events at once
在 Angular 2 / Dart 模板中,我有以下代碼行: 是否有一種語法方式可以一次綁定多個事件? 像這樣: 否則有很多事件會有很多冗余...... ...
[英]Dart/Angular 2: Pub serve 404 on page reload
有一些類似的問題,但我尚未找到解決該問題的任何方法。 假設我使用 酒吧服務-端口13371 為了在本地啟動我的Angular 2 / Dart應用程序。 在基本文件中,我有一個配置如下的路由器: 和這樣的模板: 在Dartium或其他瀏覽器中,我轉到ht ...
[英]How to select template element by ID in Angular 2 Dart?
Relativ和Dart的新手我有以下問題: my_component.dart: my_component.html: 據我所知,問題是querySelector 只查詢基本dom而不是shadowDom 。 但是,如何在模板中查詢id? ...