Take the 2-minute tour ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

I'm planning to send data throught state configuration

rationale: There are some states required full screen mode and I can not place the logic in controller as this will apply to all other section which is using this generic view.and also “I don’t want URL based state check “

Question 1 : Can we send data like this ? " data :{fullScreenMode : true}"

Question 2 : If then how to retrieve the data in the Controller.

.state(student.list', {
                    url: '/studentInformation',
                    views: {
                        'content': {
                            templateUrl: 'views/student/informations.html',
                            controller: 'StudentInfoCtrl'
                        }
                    },
                    data :{fullScreenMode : true}
      })

link: https://github.com/angular-ui/ui-router/wiki

share|improve this question
2  
I don't really understand your question. You have seen the section "Attach Custom Data to State Objects" in the link your own question, do you? If your question is "How to I access the data defined in my state from within the controller?", then its answered right there in the link: Have $state injected into your controller and just access it with $state.current.data. –  Stephen Friedrich 22 hours ago

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.