2

I have a component that I would like to use in this way:

<my-component text='ctrl.text' editable></my-component>

editable is boolean and following correct HTML semantics, does not need a value. If the editable attribute is included, it maps to an empty string, and if it isn't, processing it returns a null.

What is the correct and idiomatic way to use this boolean in my component code?

1 Answer 1

1

I think this is what you are looking for Port of ng-attr-foo from angular-js.
It's not yet in the master branch and therefor also not in the current release (0.9.4)

The example in the DartDoc comment of ng_attribute.dart shows how to use it.

Sign up to request clarification or add additional context in comments.

1 Comment

This use case is not yet supported well.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.