You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 22, 2018. It is now read-only.
[..] is the standard way to show omittable options in the man command so that date[:format] means [:format] can be omitted. I prefer AngularDart style example because AngularJS style example does not tell :format is omittable.
How many people are going to recognize the relation between shell syntax
and optional parameters for formatters in AngularDart, though? It seems
like an archaic prerequisite to me.
IMHO, what is confusing to most is the use of : to separate the formatter name from its argument. If @vicb's #772 goes through, then the : will be replaced by standard parentheses and then the bracket notation will match with Dart's optional positional argument syntax. In fact, we could then improve the documentation by writing:
The usage example for the Date formatter looks like this:
I ended up trying the following variations before I had a hunch and tried the AngularJS way of doing it:
date[medium]
date[:medium]
date['medium']
date('medium')
date(:medium)
date(medium)
To contrast, here's how AngularJS shows a usage example:
This is much more obvious in my opinion, leaving little room for interpretation.
The text was updated successfully, but these errors were encountered: