I'm upgrading my application from the beta.11 to the RC3. But I have a problem with a component I used in the beta.11 version.
Basically, I created a modular component "MyMessage", which is a angular2 component (and not a NgModule). I use this module in a page component "MessagesPage".
Here is what was working with the beta.11 :
@Component({
selector: 'my-message',
templateUrl: 'my-message.component.html',
})
export class MyMessage {
// ...
}
import { MyMessage } from '../components/my-message.component';
@Component({
templateUrl: 'messages.html' // Template contains <my-message> tags
//, directives: [ MyMessage ]
})
export class MessagesPage {
messages: Array<MyMessage>;
// ...
}
But I have a dependency problem :
Cannot find name 'MyMessage'
So I tried to move my 'MyMessage' component to a NgModule, which seemed to be the solution.
import { MyMessage } from './components/my-message.component';
@NgModule({
imports: [ IonicModule.forRoot(MyMessage) ],
declarations: [ MyMessage ]
})
export class MyMessageModule { }
And in the app.module.ts
, I added MyMessageModule
in the imports
section.
But I still have the previous error, I don't understand what I missed.
Thanks !