Closed clause closed 7 months ago
Hmm,
Thoughts on how to implement this and where to put it? Must be specific to the style element, and only on certain tags.
From: James Clause @.> Sent: Tuesday, March 19, 2024 1:28 PM To: gsilber/WebEZ @.> Cc: Subscribed @.***> Subject: [gsilber/WebEZ] Add optional transform function for one-way bindings (Issue #1)
Would be useful to have a transform function for one-way binding. This would allow for the app field to be a different type (e.g., 5) and then have it always converted to the necessary representation (e.g., "5px"). Would simplify animations stuff a lot.
— Reply to this email directly, view it on GitHub https://github.com/gsilber/WebEZ/issues/1 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AHVF3IAGZLEW4BKHQCCSJMTYZBYQZAVCNFSM6AAAAABE6ALAHWVHI2DSMVQWIX3LMV43ASLTON2WKOZSGE4TKNJWGA4TQMI . You are receiving this because you are subscribed to this thread. https://github.com/notifications/beacon/AHVF3IF5H3F3I22SB2CZMATYZBYQZA5CNFSM6AAAAABE6ALAHWWGG33NNVSW45C7OR4XAZNFJFZXG5LFVJRW63LNMVXHIX3JMTHIFXM2CU.gif Message ID: @. @.> >
Never mind I have an ideaOn Mar 19, 2024, at 1:58 PM, @. @. { font-family: "Cambria Math"; } @font-face { font-family: Calibri; } @font-face { font-family: Aptos; } p.MsoNormal, li.MsoNormal, div.MsoNormal { margin: 0in; font-size: 12pt; font-family: Aptos, sans-serif; } a:link, span.MsoHyperlink { color: blue; text-decoration: underline; } span.EmailStyle20 { font-family: Aptos, sans-serif; color: windowtext; } .MsoChpDefault { font-size: 11pt; } @page WordSection1 { size: 8.5in 11in; margin: 1in; } div.WordSection1 { page: WordSection1; }Hmm, Thoughts on how to implement this and where to put it? Must be specific to the style element, and only on certain tags. From: James Clause @.> Sent: Tuesday, March 19, 2024 1:28 PMTo: gsilber/WebEZ @.>Cc: Subscribed @.>Subject: [gsilber/WebEZ] Add optional transform function for one-way bindings (Issue #1) Would be useful to have a transform function for one-way binding. This would allow for the app field to be a different type (e.g., 5) and then have it always converted to the necessary representation (e.g., "5px"). Would simplify animations stuff a lot.—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you are subscribed to this thread.Message ID: @.>
/close
Ok, so there is now an @Pipe decorator which takes a (val:string)=>string method (I included a type PipeFunction). Stack them, put them on with a @Bind of some kind, and it will transform the value before writing it to the dom. It will not modify the variable itself.
I want to call it pipe because I kind of view this as a stepping stone to Angular as it shares many design characteristics. That is the name of the decorator in Angular.
It is published and docs were added.
From: James Clause @.> Sent: Tuesday, March 19, 2024 1:28 PM To: gsilber/WebEZ @.> Cc: Subscribed @.***> Subject: [gsilber/WebEZ] Add optional transform function for one-way bindings (Issue #1)
Would be useful to have a transform function for one-way binding. This would allow for the app field to be a different type (e.g., 5) and then have it always converted to the necessary representation (e.g., "5px"). Would simplify animations stuff a lot.
— Reply to this email directly, view it on GitHub https://github.com/gsilber/WebEZ/issues/1 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AHVF3IAGZLEW4BKHQCCSJMTYZBYQZAVCNFSM6AAAAABE6ALAHWVHI2DSMVQWIX3LMV43ASLTON2WKOZSGE4TKNJWGA4TQMI . You are receiving this because you are subscribed to this thread. https://github.com/notifications/beacon/AHVF3IF5H3F3I22SB2CZMATYZBYQZA5CNFSM6AAAAABE6ALAHWWGG33NNVSW45C7OR4XAZNFJFZXG5LFVJRW63LNMVXHIX3JMTHIFXM2CU.gif Message ID: @. @.> >
Would be useful to have a transform function for one-way binding. This would allow for the app field to be a different type (e.g., 5) and then have it always converted to the necessary representation (e.g., "5px"). Would simplify animations stuff a lot.