Had a go at using modal dialog as a directive