Open Sangd8 opened 8 years ago
Have you tried using states?
.state('home', {
url: '/home',
nativeTransitions: {
"type": "flip",
"direction": "up",
"fixedPixelsBottom": 50,
"fixedPixelsTop": 100
}
templateUrl: "templates/home.html"
})
It not working @shprink
it should, will try that tomorrow.
@shprink It's working. But There 's a problem. I create an app. I set default fixedPixelsTop and fixedPixelsBottom default is 50 Then i create page A, and page B I set fixedPixelsTop page B is 100 in route configuration When i change page from page A to page B, the header will take 100 px and you will see the content of page A before the transition complete
Hi @shprink . I have add nextViewOptions method, please take a look on this PR, Merge it if you interesting. https://github.com/shprink/ionic-native-transitions/pull/62
I definitely like the idea @daominhsangvn :)
Will check that later but your code looks great, good job.
@shprink actually after much testing doesn't work, the setDefaultOptions fixedPixelsBottom always overrides everything else.
In default options I have fixedPixelsBottom: 0, and in states code:
.state('home', {
url: '/home',
nativeTransitions: {
"type": "flip",
"direction": "up",
"fixedPixelsBottom": 50,
"fixedPixelsTop": 100
}
templateUrl: "templates/home.html"
})
The bottom is always 0
Correction, if you use native-ui-sref in the HTML, this overrides the app.js settings, and you must specify all of your settings there.
For example if I have fixedPixelsBottom specified in app.js, but not in native-ui-sref, the fixedPixelsBottom will not change.
Can you make the options (fixedPixelsBottom, fixedPixelsTop) be changed dynamically onfly? Because there some screens has tab in the top, i dont want the transition include the tab too. Is it able to do this? Something like:
But this adjustment only happen for the next transition like the $ionicHistory.nextViewOptions http://ionicframework.com/docs/api/service/$ionicHistory/