-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
change(components): disable shadow dom
Disable shadow DOM: - it causes some issues when compiled to JS - it does not play nicely with Bootstrap - most likely will be off in production because of performance issues with the shadow_dom polyfill
- Loading branch information
Showing
11 changed files
with
40 additions
and
30 deletions.
There are no files selected for viewing
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
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
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
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
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
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
part of talk_to_me; | ||
|
||
@Decorator(selector: 'toggle') | ||
class Toggle implements AttachAware { | ||
@NgTwoWay("toggle-property") | ||
bool open = false; | ||
|
||
html.Element el; | ||
Scope scope; | ||
|
||
Toggle(this.el, this.scope); | ||
|
||
void attach() { | ||
final whenOpen = el.querySelector("when-open"); | ||
final whenClosed = el.querySelector("when-closed"); | ||
|
||
whenOpen.hidden = true; | ||
whenClosed.hidden = true; | ||
|
||
scope.watch("ctrl.open", (newValue, _) { | ||
if(newValue) { | ||
whenOpen.hidden = false; | ||
whenClosed.hidden = true; | ||
} else { | ||
whenOpen.hidden = true; | ||
whenClosed.hidden = false; | ||
} | ||
}); | ||
} | ||
} |
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
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
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