This repository has been archived by the owner on Aug 7, 2021. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 49
feat(Angular): apply changes in application styles at runtime with HMR #748
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
5 tasks
c7212fa
to
af55ec6
Compare
vakrilov
reviewed
Dec 18, 2018
vakrilov
approved these changes
Dec 18, 2018
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall, looks like the logic is in place and everything works.
The code can be refactored to simplify and DRY things.
bfa482a
to
4b516cb
Compare
vakrilov
approved these changes
Dec 19, 2018
`global.__hmrInitialSync` is no more used `global.__hmrNeedReload` is removed: - on changes in multiple files (app.css, main-page.css, main-page.xml, main-page.ts) both *reapply styles* and *navigate* logic need to execute - this is important for the bootstrap of Angular apps
Remove `hmrUpdate()` from `main.ts` as a duplication of `global.__onLiveSync()`. `global.__onLiveSync()` ensures all patches get to the bundle.
4b516cb
to
bd57582
Compare
vakrilov
approved these changes
Dec 24, 2018
Update the |
Added NativeScript 5.2 HMR with Angular wiki page. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Update demo and template.
PR Checklist
What is the current behavior?
Currently, a style change in
app.css
orapp.scss
is not accepted and causes application to restart.What is the new behavior?
The new behavior accepts changes in
app.css
orapp.scss
and uses the HMR context passed bynativescript-dev-webpack
to determinate whether changes have been made toapp.css
orapp.scss
. If so, apply them at runtime and on back navigation.Relates to NativeScript/NativeScript#6665.
Implements the rest of NativeScript/NativeScript#6645.