我将ui-router模块集成到一个角度应用程序中。
使用$ stateParams处理rest api有两种方法,例如$ stateParams.userId。
controller.js
Post.createById($stateParams.userId)
.then(...);
service.js
createcreateById: function(userId) {...}
controller.js
Post.createById()
.then(...);
service.js
var id = $stateParams.userId
createById: function() {...}
什么是专业&缺点