Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor angular directive syntax #32

Merged
merged 3 commits into from
Dec 16, 2024

Conversation

deathaxe
Copy link
Contributor

@deathaxe deathaxe commented Dec 16, 2024

This PR refactors directive related contexts to

  1. assign meta.directive the same way as it is done for VueJS syntax
  2. use new angular expression syntax in directive values in favor of plain JavaScript, which fixes highlighting of as, of and other special keywords as well as pipe syntax etc.
  3. scope old ngIf and ngFor directives keyword.control to clearly distinguish them from "normal" bindings.

It rearranges expression contexts and variables to get a top-down logical context/section order starting with customized HTML contexts as root of the tree.

1. add dedicated `meta.directive` scopes (like in VueJS syntax)
2. use angular expression syntax in directive values instead of plain JavaScript
This commit moves angular expressions for a more logical order of sections,
starting with...

1. HTML injections
2. angular directives
3. angular declarations (let statement)
4. angular control flow statements
5. angular interpolation

followed by...
6. angular expressions
   with all following contexts being part of expressions.
@deathaxe deathaxe force-pushed the feat/component-directives branch from 1d178c3 to 18da096 Compare December 16, 2024 15:29
@princemaple princemaple merged commit 7d992c1 into princemaple:master Dec 16, 2024
1 check passed
@princemaple
Copy link
Owner

👍👍

@deathaxe deathaxe deleted the feat/component-directives branch December 17, 2024 07:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants