nebulr / ui-swiper

Most modern mobile touch slider for angular js
MIT License
26 stars 25 forks source link

breakpoints attribute error syntax #30

Closed auban closed 6 years ago

auban commented 6 years ago

Hello,

The breakpoints syntax is not same as angular. the json single make error with JSON.parse. To solve the problem use $parse from angular.

example: breakpoints="{'0':{'slidesPerView':1},'480':{'slidesPerView':2},'768':{'slidesPerView':3},'1025':{'slidesPerView':4}}"

Replace this s.params.breakpoints = JSON.parse(s.params.breakpoints); With this s.params.breakpoints = $parse(s.params.breakpoints)();

nebulr commented 6 years ago

can you make a pull request?