-
Notifications
You must be signed in to change notification settings - Fork 108
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to use ui-scroll with ui-router? #91
Comments
It will not work, when height of the '.viewport' element is 0. So I set the 'min-height' property. |
Yes, as it follows from the doc -- "viewport height must be constrained". |
I think I got your problem (code is not runnable, it's only showing the idea). Let's say this is your state:
Simply use ng-init inside of 'some-template.html': Your init method is using a promise to tell your datasource once the data is ready:
Finally wait for the promise inside of your get function of the data source:
If you do not want to define your controller inside of the html-template, you can use the resolve function of ui-router and inject the data inside of the controller:
|
In ui-router controller, datasource need to be resolved.
Can I have a demo?
thx.
The text was updated successfully, but these errors were encountered: