我目前有snackbar一个mat-progress-bar里面有一个元素。我想关闭snackbar元素。我的代码目前看起来像这样。
import { MAT_SNACK_BAR_DATA, MatSnackBar } from '@angular/material';
import { map } from 'rxjs/operators';
@Component({
selector: 'app-upload-progress-snackbar',
template: `
Progress:
<mat-progress-bar mode="determinate" [value]="progress | async" *ngIf="progress !== undefined"></mat-progress-bar>`,
styles: [`mat-progress-bar { margin-top: 5px;}`],
})
export class UploadProgressComponent {
constructor(@Inject(MAT_SNACK_BAR_DATA) public data) { }
private started = false;
public progress = this.data.uploadProgress.pipe(
map(({ loaded, total }) => {
if (loaded === undefined) {
return !this.started ? 0 : 100;
} else {
this.started = true; …Run Code Online (Sandbox Code Playgroud) 在DotNet Core 2.2发布后,我将我的解决方案升级到新版本,但是当我将其部署到我的Azure App Service时,它不再运行.它只是给出以下错误:
The page cannot be displayed because an internal server error has occurred.
.csproj如果您需要,我的文件看起来像这样:
<PropertyGroup>
<TargetFramework>netcoreapp2.2</TargetFramework>
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.App" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="2.2.0" />
<PackageReference Include="Microsoft.AspNetCore.Razor.Design" Version="2.2.0" PrivateAssets="All" />
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.0.2105168" />
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="2.2.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\DAL\DAL.csproj" />
<ProjectReference Include="..\Model\Models.csproj" />
</ItemGroup>
<ItemGroup>
<WCFMetadata Include="Connected Services" />
</ItemGroup>
<ItemGroup>
<Folder Include="wwwroot\userPictures\" />
</ItemGroup>
</Project>
Run Code Online (Sandbox Code Playgroud)