Is there a standard way when writing a custom directive to state that certain attributes are required to be on the same element? For example, suppose I wanted a directive that adds the numbers in an array. I could use it like this:
<show-sum arr="someScopeProperty"></show-sum> I want to say that arr is a required attribute of the show-sum directive. Maybe a JavaScript error should be thrown if it is missing. I know I can check for the arr attribute in the directive link function and throw an error if it is missing. Is this the best way to handle it? It would be cool if there was a way to indicate this as part of specifying isolate scope. -- R. Mark Volkmann Object Computing, Inc. -- You received this message because you are subscribed to the Google Groups "AngularJS" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/angular. For more options, visit https://groups.google.com/groups/opt_out.
