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
feat(template): access global #1790
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
… branch and add tests
Codecov Report
@@ Coverage Diff @@
## master #1790 +/- ##
==========================================
+ Coverage 88.41% 88.43% +0.01%
==========================================
Files 245 245
Lines 22301 22335 +34
Branches 5180 5191 +11
==========================================
+ Hits 19718 19751 +33
- Misses 2583 2584 +1
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
AureliaEffect
pushed a commit
that referenced
this pull request
Jul 24, 2023
**Features:** * **compose:** passthrough bindings + support containerless (#1792) ([e8e39a9](e8e39a9)) * **template:** access global (#1790) ([2486b58](2486b58)) **Bug Fixes:** * **router-lite:** handling slash in parameter value (#1805) ([3fbb698](3fbb698)) * **au-slot:** correctly prepare resources for slotted view (#1802) ([bf1ca4c](bf1ca4c)) * **router-lite:** e2e build ([a1ca36d](a1ca36d)) **Refactorings:** * **ref:** deprecate view-model.ref and introduce component.ref (#1803) ([97e8dad](97e8dad)) * **text-binding:** always evaluate expressions in strict mode (#1801) ([15acfee](15acfee)) * **router-lite:** query in fragment when using useUrlFragmentHash option (#1794) ([a1ca36d](a1ca36d)) * ***:** bindable property -> name (#1783) ([ca0eda7](ca0eda7)) * **router-lite:** optimize object creation (#1782) ([c1ef0a3](c1ef0a3))
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
📖 Description
Resolves #1490
At the moment, it's not convenient to access some frequently used globals in template expressions such as Array, Object, JSON, Math etc... This PR adds a fixed list of globals to be recognized in the template so that applications can access them directly, rather than having to go through JS.
Usage is the same with JS:
This is a breaking change, as it'll disable the ability to just reference
JSON
from view model. If an application runs into breakage, it'll need to be tweaked as$this.JSON....