Quantcast
Channel: Ionic Forum - Latest posts
Viewing all articles
Browse latest Browse all 228595

How to use Ionic components inside custom components/directives

$
0
0

You have to import the Ionic components and register them as 'directives' :

import {Component} from 'angular2/angular2';
import {List, Item} from 'ionic/ionic';

@Component({
    selector: 'test-list',
    templateUrl: 'app/test-list/test-list.html',
    directives: [List, Item]
})
export class TestList {
    constructor() {
    }
}

There is one thing missing still; I posted a question how to get a handle for those Ionic components inside the custom component -- to use the methods. Seems the Ionic components inside a custom components do not register themselves into the IonicApp - so getComponent('id') is not working.


Viewing all articles
Browse latest Browse all 228595

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>