小编tha*_*ebi的帖子

如何在md-autocomplete上使用ng-blur?

我想在md-autocomplete上使用模糊事件,但是ng-blur和md-blur都不起作用.

$scope.unFocus = function () {
            alert('Hello!');
        }
Run Code Online (Sandbox Code Playgroud)
<md-autocomplete md-no-cache="false" md-selected-item="selectedItem" md-search-text-change="searchLocation(searchText)"
                    md-search-text="searchText" md-items="item in searchResult" md-item-text="item.address"
                    md-selected-item-change="changeLocation(item)" md-min-length="0" md-floating-label="Your Address" ng-blur="unFocus()">
            <md-item-template>
                <span md-highlight-text="searchText" md-highlight-flags="^i">{{item.address}}</span>
            </md-item-template>
            <md-not-found>
                <i>Not Found {{searchText}}</i>
            </md-not-found>
</md-autocomplete>
Run Code Online (Sandbox Code Playgroud)

angularjs angular-material md-autocomplete

6
推荐指数
1
解决办法
5252
查看次数

IBackgroundTask 类中的任务类型

我想要做

async Task DoSomething()
{
   await SomeAsyncAPI();
}

async void Run()
{
   await DoSomething();
   DoAnother();
}
Run Code Online (Sandbox Code Playgroud)

但 IBackgroundTask 类中不允许使用任务类型。我希望 DoAnother() 在 DoSomething 完成后运行。

.net c# task-parallel-library async-await windows-runtime

2
推荐指数
1
解决办法
1361
查看次数