AngularJS:下面的URL可以用在表格里吗?
AngularJS: Is it possible for the following URL to be used in a form?
在AngularJS页面的表单中,是否可以使用以下URL设置方法?
https://example.com/transaction-address/id3
我试过这样做,但我设置的电子邮件 ID 没有被传递。表单正在注入的脚本中处理,问题(或者可能是错误)出现在注入 'id3' 方法的行中。
在 ng-app 的脚本中,我设置了 'id3' 方法:
angular.module('app', [])
.factory('Account', function($q, $u, $sce) {
$q.all([
['$http',
{'id1': 1,
'id2': 2,
'id3': 3,
'id4': 4,}
]).then(function (response) {
var sl = 'id3';
$sce.trustAsResource('id3', sl);
response.end();
});
});
您不需要在此处自动处理 id3
字符串。只需将它分配给一个变量:
angular.module('app', [])
.factory('Account', function($q, $u, $sce) {
$q.all([
['$http',
{'id1': 1,
'id2': 2,
'id3': 3,
'id4': 4,}
]).then(function (response) {
var sl = 'id3';
response.sendValue(sl);
})
});
在AngularJS页面的表单中,是否可以使用以下URL设置方法?
https://example.com/transaction-address/id3
我试过这样做,但我设置的电子邮件 ID 没有被传递。表单正在注入的脚本中处理,问题(或者可能是错误)出现在注入 'id3' 方法的行中。
在 ng-app 的脚本中,我设置了 'id3' 方法:
angular.module('app', [])
.factory('Account', function($q, $u, $sce) {
$q.all([
['$http',
{'id1': 1,
'id2': 2,
'id3': 3,
'id4': 4,}
]).then(function (response) {
var sl = 'id3';
$sce.trustAsResource('id3', sl);
response.end();
});
});
您不需要在此处自动处理 id3
字符串。只需将它分配给一个变量:
angular.module('app', [])
.factory('Account', function($q, $u, $sce) {
$q.all([
['$http',
{'id1': 1,
'id2': 2,
'id3': 3,
'id4': 4,}
]).then(function (response) {
var sl = 'id3';
response.sendValue(sl);
})
});