cordovaLocalNotification onclick

$cordovaLocalNotification.onclick when am click on to the notification its not working how to use then??
its just open the app how to give other url when am click on to notification

document.addEventListener(‘deviceready’, function () {
// window.plugin.notification.local is now available
window.plugin.notification.local.onclick = function (id, state, json) {
if(id === ‘Odean’)
{
window.location.href = ‘#/tab/offers-bpage/0’;
}
else if(id === ‘Black Horse Pub’)
{
window.location.href = ‘#/tab/offers-bpage/1’;
}
else if(id === ‘M&S’){
window.location.href = ‘#/tab/offers-bpage/2’;
}
}
}, false);

window.plugin.notification.local.onclick = function (id, state, json) { }
it works fine but $cordovalocalnotification.onclick is not working