question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Sugar (*) syntax does not support @Output (and exportAs)

See original GitHub issue

I’m submitting a … (check one with “x”)

[ x] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question

Current behavior When using sugar syntax I couldn’t find a way to register to @Outputs. The expression does not handle (output) and it’s not possible to put the output on the element itself since that element is not the actual directive. I would also like to point out that exportAs is not supported in * directives.

Expected behavior Allow to register to events on the directive.

What is the motivation / use case for changing the behavior? Sugared directives should be on par with regular directives (@Output, exportAs) as it might cause confusion. At least support parsing output’s on the expression.

  • Angular version: 2.0.1

Issue Analytics

  • State:open
  • Created 7 years ago
  • Reactions:38
  • Comments:11 (5 by maintainers)

github_iconTop GitHub Comments

16reactions
sebsncommented, Jul 4, 2019

Another year 😃 Is there a plan to implement this?

12reactions
AlexKhymenkocommented, Mar 20, 2018

Any news on this one just wanted to know is it even possible to implement?

Read more comments on GitHub >

github_iconTop Results From Across the Web

ES6 Modules aren't just syntax sugar - macwright.com
My mental model of this type of module was: Each module is the body of a closure that runs and adds properties to...
Read more >
Array Matching - Sugar.js
Node exports is an alias to .extend require('sugar')(); ... past , future , relative , and duration are output formats that allow formatting...
Read more >
Structural directives - Angular
This guide is about structural directives and provides conceptual information on how such directives work, how Angular interprets their shorthand syntax, ...
Read more >
Why can't I `export default` a constant inline with its definition?
Have a look at why JavaScript has default exports at all. They were introduced as syntactic sugar: export default function example() ...
Read more >
Module Exports vs. Export Default: Why Not Both?
CommonJS didn't have a default export. ES6 modules do. Why would you use a default export, and more importantly, what does it mean...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found