I am trying to create a custom component in angular2 / ionic2 that contains input, here is the code:
import {Component} from "angular2/core"; import {ItemInput} from "ionic-framework/ionic"; @Component({ directives: [ItemInput], selector: "add-input", template: ` <ion-input clearInput> <input type="text" value=""> </ion-input> ` }) export class AddInput { constructor() { } }
The problem is that the ion input seems to be ignored in the final page / view (without applying styles, don't even click on it). If I translate the code as it is in the main view, then it works. When adding buttons to this custom component, for example
<button>ok</button>
and import the button (and add it to the list of directives of this component too) this works. So I'm not sure if anything special should be done on the ItemInput component that will be used in the custom component, or if I just find an error.
Use of ionic 2.0 alpha49.
Any clues?
source share