角形动作柱不起作用

Tar*_*dav 3 html forms angularjs

我已经用 html 编写了以下代码,但收到错误消息“由于使用了无效方法(HTTP 动词),因此无法显示您正在查找的页面。”

在我的 html 中:

<form name="payment" action="{{vm.resource.authEndpoint+ '/Payment/SecondOpinionCasePayment'}}" method="post">
Run Code Online (Sandbox Code Playgroud)

在 html 页面源代码中:

<form name="payment" action="" method="post" class="ng-pristine ng-invalid ng-invalid-required">
Run Code Online (Sandbox Code Playgroud)

我并没有低估为什么行动会变黑。什么是表格帖子的替代品?

低于角度误差。

错误:[$interpolate:interr] http://errors.angularjs.org/1.3.14/ $interpolate/interr?p0=%7B%7Bvm.resource…%252Fapi*****.azurewebsites.net%252FPayment% 252FSecondOpinionCasePayment at Error (native) at http://*****.azurewebsites.net/lib.min.js:11:417 at K (http://*****.azurewebsites.net/lib.min .js:93:52) 在 http://*****.azurewebsites.net/lib.min.js:114:238 在 Object。(http://*****.azurewebsites.net/lib.min.js:112:433) 在 l.$digest (http://*****.azurewebsites.net/lib.min.js :128:3) 在 l.$apply (http://*****.azurewebsites.net/lib.min.js:131:58) 在 l (http://*****.azurewebsites. net/lib.min.js:86:171) 在 S (http://*****.azurewebsites.net/lib.min.js:90:301) 在 XMLHttpRequest.D.onload (http:// *****.azurewebsites.net/lib.min.js:91:315)

Sud*_*ary 5

Form the URL in you controller wrapping it with $sce.trustAsResourceUrl() use $sce to sanitize elements from potentially insecure content, if you trust the URL you can use $sce.

Inject 'ngSanitize' in your app,

var app = angular.module('myApp', ['ngSanitize']);
Run Code Online (Sandbox Code Playgroud)

then controller would be,

app.controller('urlController',['$scope', '$sce', function($scope, $sce){

var actionURL = vm.resource.authEndpoint+"/Payment/SecondOpinionCasePayment";

    $scope.formAction = $sce.trustAsResourceUrl(actionURL);

}]);
Run Code Online (Sandbox Code Playgroud)

then in your html form,

<form name="payment" action="{{formAction}}" method="post">
Run Code Online (Sandbox Code Playgroud)