当我通过$ http服务将数据发布到AngularJS中时,表单数据被添加在我的实际URL之前。因此,无论我的帖子是否成功,我都会重定向到我的默认路由页面。
通常我的URL格式就像下面,
http://localhost:4695/#/system/home/dashboard
当我发帖的形式,它变得像,
http://localhost:4695/?companyFullName=&name=&position=#/system/home/dashboard
这是我后我的形式。
$http.post('http://localhost:2795/api/company', data, { headers: { 'Content-Type': 'application/json; charset=utf-8' } });