Advanced example for angular ui-router using $resource, nested views and services