Skip to content

No longer see Angular template parsing errors on Android #721

@tsonevn

Description

@tsonevn

From @tjvantoll on March 10, 2017 19:7

If you create template parsing errors in your NativeScript + Angular apps those errors no longer appear on Android.

To recreate the problem, start a simple NativeScript + Angular app and use the following code for the app’s main component.

import { Component } from "@angular/core";

@Component({
  selector: "my-app",
  template: `
    <ActionBar class="action-bar"
    <Label text="Test"></Label>
  `
})
export class AppComponent {}

If you run this app on iOS you’ll see a template parsing error as expected.

file:///app/tns_modules/@angular/compiler/bundles/compiler.umd.js:13601:78: JS ERROR Error: Template parse errors:
	Unexpected closing tag "Label" ("
	    <ActionBar class="action-bar"
	    <Label text="Test">[ERROR ->]</Label>
	  "): AppComponent@2:23

On Android, however, the developer-friendly error seems to have been swallowed, and instead you’ll see the following.

screen shot 2017-03-10 at 2 04 51 pm

The error mentions the same file (compiler.umd.js), but the helpful message is nowhere to be found.

Note that this problem is affecting chapter 1 of the Angular Getting Started Guide, and was reported by a user in https://discourse.nativescript.org/t/ns-tutorial-chapter-1-3-syntax-error-handling-not-working/744.

Copied from original issue: NativeScript/nativescript-cli#2603

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions