占位符应用
myTransport: function (data) { return $http({ url: config.server + '/order/transport', method: "post", data: data }) }, myTransportUpdate: function (data) { var url = util.format('{0}/order/{1}/transport', config.server, data.id); return $http({ url: url, method: "put", data: data }) },
代码当中的{0}和{1}就是占位符,分别给config.server和data.id占位