You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
JSON names are supposed to be double-quoted according to the standard, however angular2-template-loader does not work. The templateUrl and styleUrls fields from the following Component directive aren't recognized:
This is technically invalid JSON as the standard requires that object keys be strings (double-quoted tokens). I prefer to use syntactically correct JSON in my code to maximize the interoperability in browsers, and I don't like having to dumb it down just because lazily ignoring the standards is pervasive among web developers.
To fix the problem, you should just have to add a quote-balancing group to your regex.
JSON names are supposed to be double-quoted according to the standard, however angular2-template-loader does not work. The templateUrl and styleUrls fields from the following Component directive aren't recognized:
However, after removing the double-quotes from the directive, the loader finds the fields correctly:
This is technically invalid JSON as the standard requires that object keys be strings (double-quoted tokens). I prefer to use syntactically correct JSON in my code to maximize the interoperability in browsers, and I don't like having to dumb it down just because lazily ignoring the standards is pervasive among web developers.
To fix the problem, you should just have to add a quote-balancing group to your regex.
FWIW: The official ECMA standard for JSON declares that object keys are strings, which it defines as tokens wrapped in quotes.
The text was updated successfully, but these errors were encountered: