how can I pass custom data to a state from a view in ui-router?
问题 I'm using $stateProvider for my route configuration. I wanted to take advantage of custom data they provide to pass some custom data from one partial page to the other (on ng-click ). This is the best I got so far: Attach Custom Data to State Objects You can attach custom data to the state object (we recommend using a data property to avoid conflicts). // Example shows an object-based state and a string-based state var contacts = { name: 'contacts', templateUrl: 'contacts.html', data: {