@@ -313,7 +313,7 @@ def add_indexed_directives(self):
313
313
indexed_attrs = [
314
314
tuple ([
315
315
'ngDir_' + self .definitionToDirective (directive ) + '\t AngularJS' ,
316
- self .definitionToDirective (directive )+ '="$1"$0'
316
+ ( 'data-' if self . settings . get ( 'enable_data_prefix' ) else '' ) + self .definitionToDirective (directive )+ '="$1"$0'
317
317
]) for directive in indexes if re .match ('directive:' , directive [0 ])
318
318
]
319
319
return list (set (indexed_attrs ))
@@ -388,9 +388,9 @@ def on_query_completions(self, view, prefix, locations):
388
388
return jscompletions .get (('module' ), ng .get_current_project_indexes ())
389
389
return jscompletions .in_string_completions (prefix , ng .get_current_project_indexes ())
390
390
391
- if (viewlocation .at_html_attribute (view , 'ng-controller' , locations )):
391
+ if (viewlocation .at_html_attribute (view , ( 'data-' if ng . settings . get ( 'enable_data_prefix' ) else '' ) + 'ng-controller' , locations )):
392
392
return jscompletions .get (('controller' ), ng .get_current_project_indexes ())
393
- if (viewlocation .at_html_attribute (view , 'ng-app' , locations )):
393
+ if (viewlocation .at_html_attribute (view , ( 'data-' if ng . settings . get ( 'enable_data_prefix' ) else '' ) + 'ng-app' , locations )):
394
394
return jscompletions .get (('module' ), ng .get_current_project_indexes ())
395
395
if (view .score_selector (_scope , ng .settings .get ('filter_scope' ))):
396
396
return ng .filter_completions ()
0 commit comments