Add custom directive in ebook app some logical bug solved