mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-19 03:32:21 +08:00
34 lines
595 B
JavaScript
34 lines
595 B
JavaScript
import {
|
|
Decorator,
|
|
View,
|
|
For,
|
|
NgElement,
|
|
Parent,
|
|
Ancestor
|
|
} from 'angular2/angular2';
|
|
import {Optional} from 'angular2/di'
|
|
import {Nav} from 'ionic/ionic';
|
|
|
|
@Decorator({
|
|
selector: '[push-to]'
|
|
})
|
|
export class PushToNav {
|
|
constructor(
|
|
element: NgElement,
|
|
@Ancestor() viewportNav: Nav
|
|
) {
|
|
console.log('PUSH TO NAV', element.domElement, viewportNav);
|
|
|
|
this.navTag = element.domElement.getAttribute('push-to');
|
|
console.log('PUSH TO NAV', this.navTag);
|
|
}
|
|
}
|
|
|
|
@Decorator({
|
|
selector: '[href]'
|
|
})
|
|
export class HrefNav {
|
|
constructor(element: NgElement) {
|
|
}
|
|
}
|