我正在开发angular 2应用程序,在我目前的项目中,我想要显示基于年份,品牌,型号的下拉值的功能.例如,如果我选择本田,那么在模型下拉列表中仅显示本田车型.
默认情况下,我将绑定年份,品牌和型号的完整数据.
这是我的观点.
VehicleComponent.html
<div class="row form-group">
<div class="col-md-3">
<label class="control-label">Year*</label><br />
<select friendly-name="Year" id="year" name="year" class="col-md-6 form-control" ng-required="true" onchange='OnChange()' >
<option>Select</option>
<option *ngFor='let type of lookupdetailsvehicleyearinfo'>{{type.LookupValue}}</option>
</select>
</div>
<div class="col-md-3">
<label class="control-label">Make*</label><br />
<select friendly-name="Make" class="col-md-6 form-control" ng-required="true" >
<option>Select</option>
<option *ngFor='let type of lookupdetailsvehiclemakeinfo'>{{type.LookupValue}}</option>
</select>
</div>
<div class="col-md-3">
<label class="control-label">Model*</label>
<select friendly-name="Model" class="col-md-6 form-control" ng-required="true" >
<option>Select</option>
<option *ngFor='let type of lookupdetailsvehiclemodelinfo'>{{type.LookupValue}}</option>
</select>
</div>
</div>
Run Code Online (Sandbox Code Playgroud)
我将从My Own API获得上述数据.
您能告诉我如何在angular 2应用程序中编写typescript代码以获得上述功能.
我很难在C#中用打字稿和解密来实现加密.在这里发布问题之前,我做了Google并找到了一些链接,但这些链接与JavaScript有关,而不是打字稿.
如何在Angular 2中导入非核心npm模块,例如(使用加密库)?
我按照上面的链接,在我当前的应用程序中实现加密/解密概念.
这是我在myservice.ts中编写的代码
//import { CryptoJS } from 'node_modules/crypto-js/crypto-js.js';
//import 'crypto-js';
import * as CryptoJS from 'crypto-js';
var key = CryptoJS.enc.Utf8.parse('7061737323313233');
var iv = CryptoJS.enc.Utf8.parse('7061737323313233');
var encrypted = CryptoJS.AES.encrypt(CryptoJS.enc.Utf8.parse("It works"), key,
{
keySize: 128 / 8,
iv: iv,
mode: CryptoJS.mode.CBC,
padding: CryptoJS.pad.Pkcs7
});
var decrypted = CryptoJS.AES.decrypt(encrypted, key, {
keySize: 128 / 8,
iv: iv,
mode: CryptoJS.mode.CBC,
padding: CryptoJS.pad.Pkcs7
});
console.log('Encrypted :' + encrypted);
console.log('Key :' + encrypted.key);
console.log('Salt :' + encrypted.salt);
console.log('iv :' …
Run Code Online (Sandbox Code Playgroud) 我正在使用机器人框架技术,在我的一个项目中,我想在表单中显示英雄卡。
对于那个场景,我使用 Form Flow 概念来开发我自己的表单,但是我很难在与我的机器人进行表单对话的过程中添加英雄卡片。
我按照以下文档使用 C# 进行了英雄卡编码。 http://docs.botframework.com/en-us/csharp/builder/sdkreference/attachments.html
并遵循以下文档使用表单流概念开发我自己的表单。 http://docs.botframework.com/en-us/csharp/builder/sdkreference/forms.html
请告诉我如何使用 Form Flow 概念在机器人对话中添加英雄卡。
-普拉迪普
在我当前的项目中,我想添加下拉列表,因为我从这个链接中获取了代码.添加以下代码后,下拉列表显示为示例,但是当我单击它时没有任何反应.
<li class="dropdown">
<a [routerLink]="['/frontendai']" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Application Insights <span class="caret"></span></a>
<ul class="dropdown-menu" role="menu">
<li><a [routerLink]="['/frontendai']">FrontEnd AI</a></li>
<li class="divider"></li>
<li><a [routerLink]="['/apiai']">API AI</a></li>
<li class="divider"></li>
<li><a [routerLink]="['/apiai']">SQL Exception</a></li>
</ul>
</li>
Run Code Online (Sandbox Code Playgroud)
我使用了Bootstrap版本3.3.7,并在index.cshtml中添加了以下行
<link href="node_modules/bootstrap/dist/css/bootstrap.css" rel="stylesheet" />
<link href="node_modules/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet" />
<script src="~/node_modules/bootstrap/dist/js/bootstrap.min.js"></script>
Run Code Online (Sandbox Code Playgroud)
如何在Angular 2项目中使用Bootstrap下拉列表?
我很高兴将Cosmos DB用于我当前的应用程序而不是Azure SQL数据库.
在我当前的应用程序中使用Cosmos DB作为后端之前,我脑子里几乎没有问题
因此,如果我转移到Cosmos DB而不是使用Azure SQL数据库,那么如何使用Cosmos DB实现这些功能?
文档未指定有关加密,屏蔽和实体框架的详细信息.
你能否告诉我"是否可以使用符合上述要求的Cosmos DB而不是Azure SQL数据库?
我有一个几天前部署的生产Azure网站。我在应用程序见解(现在已启用配置的服务器端AI和客户端AI)中看到了“ 可用性 ”部分,并且通过新门户(portal.azure.com),我决定设置可用性“ ping”测试。
我将大多数设置保留为默认设置,“测试类型”为URL ping测试,URL设置为我的应用程序的根目录,频率为5分钟。我在美国不同地区将测试位置保留为默认值5。
我注意到的是所有测试都失败了,并且我在应用程序中看到了很多关于GET的请求,状态为404。由于它用垃圾填充了我的应用程序洞察力请求日志,而可用性测试记录了所有失败,删除了可用性测试。令人讨厌的是,删除后,我注意到刷新页面后它仍然存在,因此我再次删除了它,现在它显示为“未配置”,并且似乎已经消失了。
在删除可用性测试之前,我在AI日志中看到了所有这些GET /请求,并且查看了它们的IP地址,它们的确似乎来自美国不同地区。
删除测试后,我认为它们都将停止。不幸的是,这没有发生,但5个ping测试中只有1个停止了,但是IP地址为:: 1的ping测试似乎仍在发生。尽管删除了Ping测试,但仍然每隔5分钟进行一次将近一周的测试。
如何从应用程序见解中完全删除可用性测试?
azure-web-sites azure-application-insights azure-availability-set
我正在尝试通过使用内联模式的 PowerShell 任务在 Azure DevOps 管道中执行以下 PowerShell 脚本。
$clientId= "xxxxxxxxx"
$clientSecret= "xxxxxxx"
$subscriptionId= "xxxxxxxx"
$tenantId= "xxxxxxxxxxxxx"
# sign in
Write-Host "Logging in...";
$SecurePassword = $clientSecret | ConvertTo-SecureString -AsPlainText -Force
$cred = new-object -typename System.Management.Automation.PSCredential -argumentlist $clientId, $SecurePassword
Connect-AzAccount -ServicePrincipal -Credential $cred-Tenant $tenantId
# set azure context with subscriptionId
Set-AzContext -SubscriptionId $subscriptionId
# select subscription
Write-Host "Selecting subscription '$subscriptionId'";
Select-AzSubscription -SubscriptionId $subscriptionId;
Run Code Online (Sandbox Code Playgroud)
但我收到以下错误:
Connect-AzAccount :术语“Connect-AzAccount”不被识别为 cmdlet、函数、脚本文件或可运行程序的名称。检查名称的拼写,或者如果包含路径,请验证路径是否正确,然后重试。
我已将 SonarQube 和 Checkmarx SAST 和 SCA 集成到 Azure DevOps 构建管道中。我可以毫无问题地查看 SonarQube 和 Checkmarx 报告。
我有以下问题。有人可以澄清一下吗:
我使用以下链接在visual studio 2015中开发了带有typescript 2.0版本的简单角度2应用程序.
https://angular.io/docs/ts/latest/cookbook/visual-studio-2015.html
之后,我为该应用程序配置了DEVOPS,这意味着每当我使用visual studio 2015将代码检入团队基础服务器中的团队项目中时,它会自动开始为我的应用程序构建,当时我得到例外" Unknown Compiler"选项lib "下图.
请告诉我如何解决上述问题.
-Pradeep
typescript visual-studio-2015 azure-devops azure-pipelines angular
我正在使用打字稿开发 Angular 2 应用程序。在我当前的项目中,我实现了将图像上传到天蓝色存储 blob 的功能,为此我点击了以下链接。
http://www.ojdevelops.com/2016/05/end-to-end-image-upload-with-azure.html
我为视图编写了以下代码行,以从本地计算机中选择图像。
<form name="form" method="post">
<div class="input-group">
<input id="imagePath" class="form-control" type="file" name="file" accept="image/*" />
<span class="input-group-btn">
<a class="btn btn-success" (click)='uploadImage()'>Upload</a>
<!--href="../UploadImage/upload"-->
<!--(click)='uploadImage()'-->
</span>
</div>
</form>
Run Code Online (Sandbox Code Playgroud)
当我单击“上传”按钮时,在uploadcomponent.ts文件中编写以下代码行,用于发出 http post 请求以及作为所选图像路径的内容。
uploadImage(): void {
//var image = Request["imagePath"];
//alert('Selected Image Path :' + image);
this.imagePathInput = ((<HTMLInputElement>document.getElementById("imagePath")).value);
alert('Selected Image Path :' + this.imagePathInput);
let imagePath = this.imagePathInput;
var headers = new Headers();
headers.append('Content-Type', 'application/x-www-form-urlencoded');//application/x-www-form-urlencoded
this._http.post('/UploadImage/UploadImagetoBlob', JSON.stringify(imagePath),
{
headers: headers
})
.map(res => res.json()) …
Run Code Online (Sandbox Code Playgroud) angular ×5
typescript ×5
azure-devops ×2
aes ×1
azure ×1
botframework ×1
c# ×1
checkmarx ×1
dropdown ×1
security ×1
sonarqube ×1