-
Notifications
You must be signed in to change notification settings - Fork 27.1k
Closed
Description
Not sure how common this will be but I ran into a cryptic error when a # is included in the string to templateUrl. Simple example:
@Component({
selector: 'app',
})
@View({
templateUrl: `
<p #p>Hello</p>
`
})
export class App {}
In the above example, it was just a goof and I forgot to change templateUrl to template.
Without the # you get a nice error message:
EXCEPTION: Failed to load the template for "App" : Failed to fetch url "http://127.0.0.1:8080/
Hello
With the # you get this:
Firefox:
EXCEPTION: TypeError: parts is null
Chrome:
EXCEPTION: TypeError: Cannot read property '1' of null
From what I've found the same error happens with any string that has a # in it.
Reactions are currently unavailable