allow passing the template as an observable. fix #2