export class AppComponent {
title = 'app works!';
constructor() {
let test1 = {
id: 'test',
moduleId1: 'moduleId1',
moduleId: 'IsThisReserverdWord',
moduleId2: 'moduleId2'
};
console.log(test1.moduleId);
let test2 = {
moduleId: 'moduleId3',
};
}
It is very strange that the console log part is never hit and there is no exception. By removing the moduleId: 'IsThisReserverdWord' property it is all fine.
Is moduleid reserved key word as when i try and print the moduleId without having any other property in test it gives undefined and also if i try and print moduleId2 in the above test object it throws error test1 is not defined.
Issue was previously opened in Angular github link
export class AppComponent {
title = 'app works!';
constructor() {
}
It is very strange that the console log part is never hit and there is no exception. By removing the moduleId: 'IsThisReserverdWord' property it is all fine.
Is moduleid reserved key word as when i try and print the moduleId without having any other property in test it gives undefined and also if i try and print moduleId2 in the above test object it throws error test1 is not defined.
Issue was previously opened in Angular github link