[jbosstools-issues] [JBoss JIRA] (JBIDE-15378) Basic content assist for static AngularJS ng-* attributes
Alexey Kazakov (JIRA)
jira-events at lists.jboss.org
Tue Aug 27 19:29:26 EDT 2013
[ https://issues.jboss.org/browse/JBIDE-15378?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12799726#comment-12799726 ]
Alexey Kazakov commented on JBIDE-15378:
----------------------------------------
{quote}
Directives have camel cased names such as ngBind. The directive can be invoked by translating the camel case name into snake case with these special characters :, -, or _
Optionally the directive can be prefixed with x-, or data- to make it HTML validator compliant.
{quote}
http://docs.angularjs.org/guide/directive
It means that for example for *ngTrueValue* parameter of input [select] directive we have the following list of all possible combinations:
{code}
<input ng-true-value="..." >
<input ng-true_value="..." >
<input ng-true:value="..." >
<input ng_true-value="..." >
<input ng_true_value="..." >
<input ng-true:value="..." >
<input ng:true-value="..." >
<input ng:true_value="..." >
<input ng:true:value="..." >
<input data-ng-true-value="..." >
<input data-ng-true_value="..." >
<input data-ng-true:value="..." >
<input data-ng_true-value="..." >
<input data-ng_true_value="..." >
<input data-ng-true:value="..." >
<input data-ng:true-value="..." >
<input data-ng:true_value="..." >
<input data-ng:true:value="..." >
<input x-ng-true-value="..." >
<input x-ng-true_value="..." >
<input x-ng-true:value="..." >
<input x-ng_true-value="..." >
<input x-ng_true_value="..." >
<input x-ng-true:value="..." >
<input x-ng:true-value="..." >
<input x-ng:true_value="..." >
<input x-ng:true:value="..." >
{code}
So there are 18!!! correct ways of using ngTrueValue directive. It would be a mess if we support all the options and show 18 proposals just for one attribute. IMO we should support only the most used style ng-* (i.g. ng-true-value="...") and probably the HTML5 specification friendly way: data-ng-true-value:
{code}
<input ng-true-value="..." >
<input data-ng-true-value="..." >
{code}
[~maxandersen] what do you think?
> Basic content assist for static AngularJS ng-* attributes
> ---------------------------------------------------------
>
> Key: JBIDE-15378
> URL: https://issues.jboss.org/browse/JBIDE-15378
> Project: Tools (JBoss Tools)
> Issue Type: Feature Request
> Components: jsp/jsf/xml/html source editing
> Reporter: Alexey Kazakov
> Assignee: Alexey Kazakov
> Labels: new_and_noteworthy
> Fix For: 4.1.x, 4.2.0.Alpha1
>
>
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jbosstools-issues
mailing list