淡淡烟草味2017-05-15 17:15:33
官方文件地址
https://ui-router.github.io/n...$stateProvider
關於$stateProvider.state的data的解釋
Arbitrary data object, useful for custom configuration. The parent state's data is prototypally inherited. In other words, adding a data property to a state adds it to the entire subtree viaobty inherit
機翻任意資料對象,適用於自訂配置。 父狀態的資料是原型繼承的。 換句話說,將資料屬性新增至狀態透過原型繼承將其新增至整個子樹。
簡單來說,就是路由的自訂配置,可以在控制器中拿到這個值作為一個參數