isolate modal dialog using view model to library.