我正在尝试将 webjob 发布到 Azure,但出现一些如下错误。看起来是因为在“Out”之后的路径中它添加了两个反斜杠而不是一个(PubTmp\Out\\app_data)。
28>Could not copy "C:\Development\TNG\ActivationService\bin\Release\netcoreapp3.1\TNG.Services.WindowsService.ActivationService.runtimeconfig.json" to "C:\Development\TNG\ActivationService\obj\Release\netcoreapp3.1\PubTmp\Out\\app_data\Jobs\Continuous\TNG.Services.WindowsService.ActivationService\TNG.Services.WindowsService.ActivationService.runtimeconfig.json". Beginning retry 1 in 1000ms. Could not find a part of the path 'C:\Development\TNG\ActivationService\obj\Release\netcoreapp3.1\PubTmp\Out\\app_data\Jobs\Continuous\TNG.Services.WindowsService.ActivationService\TNG.Services.WindowsService.ActivationService.runtimeconfig.json'.
28>Could not copy "C:\Users\mohsen.rezaei\.nuget\packages\microsoft.extensions.configuration.azureappconfiguration\4.0.0\lib\netstandard2.0\Microsoft.Extensions.Configuration.AzureAppConfiguration.dll" to "C:\Development\TNG\ActivationService\obj\Release\netcoreapp3.1\PubTmp\Out\\app_data\Jobs\Continuous\TNG.Services.WindowsService.ActivationService\Microsoft.Extensions.Configuration.AzureAppConfiguration.dll". Beginning retry 1 in 1000ms. Could not find a part of the path 'C:\Development\TNG\ActivationService\obj\Release\netcoreapp3.1\PubTmp\Out\\app_data\Jobs\Continuous\TNG.Services.WindowsService.ActivationService\Microsoft.Extensions.Configuration.AzureAppConfiguration.dll'.
28>Could not copy "C:\Users\mohsen.rezaei\.nuget\packages\microsoft.extensions.configuration.environmentvariables\3.1.6\lib\netcoreapp3.1\Microsoft.Extensions.Configuration.EnvironmentVariables.dll" to "C:\Development\TNG\ActivationService\obj\Release\netcoreapp3.1\PubTmp\Out\\app_data\Jobs\Continuous\TNG.Services.WindowsService.ActivationService\Microsoft.Extensions.Configuration.EnvironmentVariables.dll". Beginning retry 1 in 1000ms. Could not find a part of the path 'C:\Development\TNG\ActivationService\obj\Release\netcoreapp3.1\PubTmp\Out\\app_data\Jobs\Continuous\TNG.Services.WindowsService.ActivationService\Microsoft.Extensions.Configuration.EnvironmentVariables.dll'.
28>Could not copy "C:\Users\mohsen.rezaei\.nuget\packages\microsoft.extensions.dependencyinjection.abstractions\3.1.6\lib\netstandard2.0\Microsoft.Extensions.DependencyInjection.Abstractions.dll" to "C:\Development\TNG\ActivationService\obj\Release\netcoreapp3.1\PubTmp\Out\\app_data\Jobs\Continuous\TNG.Services.WindowsService.ActivationService\Microsoft.Extensions.DependencyInjection.Abstractions.dll". Beginning retry 1 in 1000ms. Could not find a part …Run Code Online (Sandbox Code Playgroud) 我正在尝试访问 Angular2 中的 div,如下所示:
import { Component, ViewChild, ElementRef, AfterContentInit } from '@angular/core';
@Component({
selector: 'main',
template: `
<div #target class="parent">
<div class="child">
</div>
</div>
`
})
export class MainComponent implements AfterContentInit {
@ViewChild('target') elementRef: ElementRef;
ngAfterContentInit(): void {
var child = this.elementRef.nativeElement.querySelector('div');
console.log(child);
}
}
Run Code Online (Sandbox Code Playgroud)
但我得到以下异常:
异常:调用节点模块失败并出现错误:TypeError:this.elementRef.nativeElement.querySelector 不是函数
我是angular2的新手.我的代码是这样的:
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'main',
template: `
<div class="current">
</div>
`
})
export class MainComponent implements OnInit {
ngOnInit(): void {
//change the div class from current to next...
}
}
Run Code Online (Sandbox Code Playgroud)
我想把div类从'current'更改为'next'.
如果你让我知道最好的方法是什么,我是否合适?