这是我的代码
$http.get("/Student/GetStudentById?studentId=" + $scope.studentId + "&collegeId=" + $scope.collegeId)
.then(function (result) {
});
在上面的代码中,使用 http 服务根据 id 获取学生详细信息。但我想像在 c#.net 中一样编写上面的服务 string.format
(eg:- string.format("/Student/GetStudentById/{0}/collegeId/{1}",studentId,collegeId)
原文由 durga siva kishore mopuru 发布,翻译遵循 CC BY-SA 4.0 许可协议