我试图使用angular提供的$ confirm服务。以下咖啡脚本引发错误:
$scope.showConfirmation = ->
$confirm({text: 'Can we test?'})
.then () -> $log.info("test")
错误:
http://errors.angularjs.org/1.2.14/$injector/unpr?p0=%24confirmProvider%20%3C-%20%24confirm **Cause : <div class="ng-scope" ng-view=""**>
答案 0 :(得分:1)
请参阅[HttpPost]
[Produces("application/json")]
public IActionResult Post([FromBody] RequestClass RequestData)
{
var stream = this.HttpContext.Request.Body;
stream.Position = 0;
using (var reader = new StreamReader(stream))
{
string body = reader.ReadToEnd();
Telemetry.TrackTrace(body, Microsoft.ApplicationInsights.DataContracts.SeverityLevel.Information);
}
return Ok();
}
个文档,了解如何在整个应用中注入服务:https://schlogen.github.io/angular-confirm/
$confirm
angular.module('myApp', ['angular-confirm']);