Hi there, I'm currently working with Angular2 and am facing an issue when trying to use two classes in the same Typescript file.
During compile time, no errors are shown. However, when attempting to run the page, the console.log displays the following error:
Error: BaseException@http://www.my.app/panel-module/node_modules/@angular/compiler//bundles/compiler.umd.js:5116:27
CompileMetadataResolver</CompileMetadataResolver.prototype.getNgModuleMetadata/<@http://www.my.app/panel-module/node_modules/@angular/compiler//bundles/compiler.umd.js:13274:35
...
Below is the content of my component's typescript file.
// MyComponent.ts
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'my-app',
templateUrl: '/path/to/view',
})
export class MyObject {
id: number;
}
export class MyComponent {
obj: MyObject;
// additional code here
}