Skip to content

feat(compiler): Add support for setting attributes to Component host ele...#1052

Closed
marclaval wants to merge 1 commit into
angular:masterfrom
marclaval:issue1008
Closed

feat(compiler): Add support for setting attributes to Component host ele...#1052
marclaval wants to merge 1 commit into
angular:masterfrom
marclaval:issue1008

Conversation

@marclaval
Copy link
Copy Markdown
Contributor

...ment

It fixes #1008 and #1009 by extending @PropertySetter to support the same cases as [] do, e.g. attr.role, class.foo or style.width.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any reason why this test doesn't have expect(setterFn).toBe(otherSetterFn);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like a closure is re-created each time, should it return a lazy initialized var instead ?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or
setterFn = (element, value) => DOM.setInnerHTML(element, value);
->
setterFn = DOM.setInnerHTML

@mhevery mhevery added @lgtm action: merge The PR is ready for merge by the caretaker action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews labels Mar 24, 2015
@angular-automatic-lock-bot
Copy link
Copy Markdown

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot Bot locked and limited conversation to collaborators Sep 13, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews action: merge The PR is ready for merge by the caretaker cla: yes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for setting attributes to Component host element

5 participants