Advertisement
Guest User

Untitled

a guest
Apr 28th, 2017
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. var $ = jQuery;
  2. module.exports = {
  3. init : function(){
  4. $(document).on('submit', 'form.searchform', function(e){
  5. if( window.angular ){
  6. e.preventDefault();
  7. var $form = $(e.currentTarget);
  8. var data = $form.serialize();
  9. var $injector = angular.element( $('html')[0] ).injector();
  10.  
  11. var $location = $injector.get('$location');
  12. $location.path("/healthy-living/?"+data);
  13. }
  14. });
  15.  
  16. }
  17. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement