In a form for an AngularJS page, is it possible to use the following URL to be set for a method?
https://example.com/transaction-address/id3
I’ve tried doing this, but the email id I’ve set is not being passed. The form is being handled in the injected script and the problem (or maybe a mistake) is in the line that injects the ‘id3’ method.
In the script for the ng-app, I’ve set the ‘id3’ method:
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(); }); });
Answer
You don’t need to automatize the id3
string here. Just assign it to a variable:
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); }) });