converted to using template instead of templateUrl
converted to using child scope instead of isolate scope