last day (14 days later) » 

6:58 AM
hey, are you there?
 
Yep
 
cool, did you get my last message on that comment?
i'm on my bros acc, don't have enough reputation
 
Yeah, but I don't understand the whole picture. Are you using ui-sref to go to home? And from what state?
 
yes i am using ui-sref, one sec i will paste my code
.state('home', {
url: '/home',
views: {
'': { templateUrl: 'fullscreennest.html' },


'privateView@home': { templateUrl: 'home-chat.html' }
}
})

.state('home.friends', {
url: '/friends',
views: {
'': { templateUrl: 'friend.html' },
'privateView@home': { templateUrl: 'private-chat.html' }
}
})

.state('home.groups', {
url: '/groups',
views: {
'': { templateUrl: 'group.html' },
'privateView@home': { templateUrl: 'private-chat.html' }
}
})

.state('home.search', {
url: '/search',
views: {
'': { templateUrl: 'search.html' },
the html.. <div class="col-xs-3 home-option" ui-sref="home"><i class="fa fa-home fa-2x"></i></div>
<div class="col-xs-3 friend-option" ui-sref=".friends"><i class="fa fa-user fa-2x"></i></div>
<div class="col-xs-3 group-option" ui-sref=".groups"><i class="fa fa-users fa-2x"></i></div>
<div class="col-xs-3 search-option" ui-sref=".search"><i class="fa fa-search fa-2x"></i></div>
so from my code, if I went went back to /home the tab state i was one won't be remembered
am i making sense?
 
Yeah. This is pretty different than what was in your question though.
If you don't care about the URL, then you're probably better off not using ui-router to change those views.
 
7:08 AM
sorry, i'm bad at wording my questions
how else could I do it?
is there a way though in ui-routing
 
What's on the home state?
Do you have a plunker or jsfiddle?
 
i dont. I have a main.html file that has a ui-view and inside the ui-view is fullscreen.html
so on home state the html page goes back to default which is the issue
 
I don't think I can really help without totally understanding the use case. Why would someone go from home.friends to home, for example?
 
ok, it may be best for me to explain the app
is there an easier way to communicate like google hangouts?
i can start one if you want
 
Probably would be best to post as a question on the main site so others can help out. I won't be available much longer
 
7:20 AM
its a chat app, basicly the right div is the chat messages like we are on
and the left dic is the friends tab/groups tab and search friends tab
left div*
 
i have a public chat and a private chat
which populates the div on the right conditionally
for example if i clicked on the "home" tab I want the right div to populate my public chat.html file while my left tab stays on the state it is on
 
But then how do you re-open the private chat?
 
for example if i was on friends tab and I clicked on ui-sref="home" that means I want my right div to load the public chat while the left dic stays at the state it was (friends list)
 
Yeah, that makes sense. But after that step, what if you want to go back to the private chat. What do you click on?
 
7:25 AM
by clicking on a name on the private tab list
it may be good to see the ui for it though as may be confusing
its just getting the states to stay on what they
i have no idea how to do that
 
Yeah, ui-router by itself is not a good solution for what you're wanting.
I'd recommend looking into sticky states, which is part of ui-router-extras
I've never used it myself, but it sounds like that would be appropriate.
 
ok awesome, thank-you very much
i was thinking worst case I had to write a controller
that detects the url I am on and loads a custom route for that scenario
which may be too hacky
 
Yeah I honestly have no clue how the URL works with sticky states. That module seems well supported though
 
ok, thanks for help!
 
No problem
 

last day (14 days later) »