andy brandt's blog

angular 4 hammer config

hammer is a very nice library to make detecting different types of touches very easy. from everything i read, it sounded like angular had some built in support for hammer. the problem came when i needed to configure hammer, for example, we were only interested in detecting horizontal swipes, but we still wanted to be able to scroll vertically, so it wasn’t exactly clear how to achieve that. there are two great tutorials (one, two) available, but they didn’t go into detail on how to pass configuration to hammer, other than the fine-grained configuration on how how each recognizer behaves.
1 of 1