Ich verwende Nodejs & Expressjs für mein Back-End, Angular für meine Front-End. Bei der Verwendung von Angular in meiner Website übersetzen, zeigt die Konsole diese Meldung:Fehler: JSON-Parse-Fehler: Eigenschaftsname muss ein Zeichenfolgenliteral bei Verwendung von eckigen translate sein
Error: JSON Parse error: Property name must be a string literal
[email protected][native code]
[email protected]://localhost:3000/angular/angular.js:1321:19
[email protected]://localhost:3000/angular/angular.js:10393:24
http://localhost:3000/angular/angular.js:10484:14
[email protected]://localhost:3000/angular/angular.js:322:24
[email protected]://localhost:3000/angular/angular.js:10483:10
[email protected]://localhost:3000/angular/angular.js:11278:34
[email protected]://localhost:3000/angular/angular.js:15961:30
http://localhost:3000/angular/angular.js:15977:39
[email protected]://localhost:3000/angular/angular.js:17229:28
[email protected]://localhost:3000/angular/angular.js:17045:36
[email protected]://localhost:3000/angular/angular.js:17337:31
[email protected]://localhost:3000/angular/angular.js:11572:53
[email protected]://localhost:3000/angular/angular.js:11778:15
[email protected]://localhost:3000/angular/angular.js:11711:24
Ich bin sicher, dass alle Objekte in JSON-Dateien notiert sind.
Dies ist die locale-Dateien:
{
"directives.language-select.Language": "Select Language",
"views.video-modal.Download": "Download",
"views.video-modal.Visit": "Visit",
"views.video-modal.Copy": "Copy",
"views.video-modal.Close": "Close",
}
Seltsam, wenn ich nur
"directives.language-select.Language": "Select Language",
diese Linie hatte. Die Seite hat perfekt funktioniert. Was verursacht dieses Problem?