Skip to content
This repository was archived by the owner on Aug 7, 2021. It is now read-only.

chore: fix liveSync of html files in Angular apps #845

Merged
merged 1 commit into from
Apr 1, 2019

Conversation

rosen-vladimirov
Copy link
Contributor

In case you change .html file in Angular application, during tns run <platform> --bundle, the application will be restarted and an error will be shown.
This happens as in some cases, the getCompiledFile method from Angular compiler does not throw an error when it is unable to find a file, but instead it returns an object with empty outputText and array of errors (errorDependencies).
Fix the liveSync in these cases by checking the result of the Angular compiler and fallback to non-platform specific file in the mentioned case.

PR Checklist

What is the current behavior?

Unable to use LiveSync in Angular applications.

What is the new behavior?

LiveSync works in Angular applications.

Fixes/Implements/Closes #[Issue Number].

In case you change `.html` file in Angular application, during `tns run <platform> --bundle`, the application will be restarted and an error will be shown.
This happens as in some cases, the `getCompiledFile` method from Angular compiler does not throw an error when it is unable to find a file, but instead it returns an object with empty outputText and array of errors (errorDependencies).
Fix the liveSync in these cases by checking the result of the Angular compiler and fallback to non-platform specific file in the mentioned case.
@rosen-vladimirov rosen-vladimirov merged commit dc6210d into master Apr 1, 2019
@rosen-vladimirov rosen-vladimirov deleted the vladimirov/fix-angular-livesync branch April 1, 2019 16:35
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants