Wrapper for Rellax.js, parallax library, by Moe Amaya (@moeamaya). Watches $location for url changes, deletes any previous Rellax objects, then recreates them for the new page. Also, watches the viewport width, removing Rellax when the page is below 1160. Rellax will only return when URL is changed, i.e. on route change.
Dependencies:
| Name | Type | Description |
|---|---|---|
| $timeout | AngularJS wrapper for window.timeout |
|
| $rootScope | AngularJS Global scope object |
|
| $location | AngularJS service that wraps window.location |
Members
Methods
-
rellaxWrapperLink (scope, element, attrs)
-
Link function responsible for all DOM manipulation.
Parameters:
Name Type Description scope AngularJS directive scope
element JQuery element on which the directive is activated
attrs attributes of the element on which the directive is activated