I am trying to use a component in my application from another application. My projects are in the same folder, so I thought it would work, but I get the exception "I can not find the module." Is there any way to do this? or another way to achieve this?
What i have done so far:
import { Component, OnInit } from '@angular/core';
import { OverviewPaginationComponent } from './../../../../overview/src/app/overview-pagination/overview-pagination.component.ts';
@Component({
moduleId: module.id,
selector: 'combi',
template: `
<overview-pagination><overview-pagination>
`,
styleUrls: ['combi.component.css'],
providers: [],
directives: [OverviewPaginationComponent]
})
export class CombiComponent implements OnInit {
constructor() {}
ngOnInit() {
}
}
And defined in systemConfig:
const barrels: string[] = [
// Angular specific barrels.
'@angular/core',
'@angular/common',
'@angular/compiler',
'@angular/forms',
'@angular/http',
'@angular/router',
'@angular/platform-browser',
'@angular/platform-browser-dynamic',
'@angular/router-deprecated',
// Thirdparty barrels.
'rxjs',
// App specific barrels.
'app',
'app/shared',
'app/combi',
'../../overview/src/app/overview-pagination',
/** @cli-barrel */
];
source
share