An angularjs interface of page visibility API