mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-19 03:32:21 +08:00
29 lines
453 B
TypeScript
29 lines
453 B
TypeScript
import {Directive} from 'angular2/angular2';
|
|
|
|
import {IonicApp} from 'ionic/ionic'
|
|
|
|
|
|
@Directive({
|
|
selector: '[register]',
|
|
properties: [
|
|
'register',
|
|
'registerId: register-id'
|
|
],
|
|
host: {
|
|
'this.register-id': 'registerId'
|
|
}
|
|
})
|
|
export class Register {
|
|
|
|
constructor(app: IonicApp) {
|
|
this.app = app;
|
|
}
|
|
|
|
onInit() {
|
|
if (this.register && this.registerId) {
|
|
this.app.register(this.registerId, this.register);
|
|
}
|
|
}
|
|
|
|
}
|