Join the Stack Overflow Community
Stack Overflow is a community of 6.8 million programmers, just like you, helping each other.
Join them; it only takes a minute:
Sign up

I have a problem. I use 2 controller in 1 navigation like this

thread
  click button go to answer

Thread and Answer different controller. So, I use this in table thread (go to view answer)

<button type="button" class="btn btn-default" ui-sref="answer({id : data.item._id})"><i class="fa fa-eye"></i> View Answer</button>

But, if I clicked button answer and showing view answer. My navigation is not active again and not in navigation thread. I think the problem in nested views or nested states. But i dont understand. Can you help me ? Thanks

This is my app.config

.state({
                name: 'thread',
                url : '/thread',
                controller: 'thread-controller',
                templateUrl: 'templates/table-thread.html',
                children :  [
                                {
                                    name: 'answer',
                                    url : '/answer/:id',
                                    params : {
                                        id : null  
                                    },
                                    controller: 'answer-controller',
                                    templateUrl: 'templates/table-answer.html'
                                }
                            ]
        })
share|improve this question
    
try to set out the children view in a one view – Álvaro Touzón Mar 1 at 6:42
    
But I should use another view , because table-thread and table-answer is different and must be separate – userpr Mar 1 at 6:44
    
yes will be two separated views, in to separated states – Álvaro Touzón Mar 1 at 8:27
    
Can you give me example ? I dont understand what you mean – userpr Mar 1 at 9:27

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.