Pass scope between 2 pages

stateParams is an array I think. So try to replace

$stateParams.chatId

with

$stateParams['chatId']

your route to chat with controller ChatDetailCtrl in app.js seems to be configured correctly to pass parameters with stateparams.

I didn’t find the calls to navigate to chat, so can’t tell you if that is correct or not.