Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
367 views
in Technique[技术] by (71.8m points)

javascript - 使用Angular Router导航后的Bootstrap Carousel Swipe Bug(router.navigate)(Bootstrap Carousel Swipe Bug after navigating using Angular Router (router.navigate))

I'm not sure if I should be posting it here but I can't find any answers.

(我不确定是否应该在此处发布它,但找不到任何答案。)

Please don't downvote.

(请不要投票。)

I'm using Angular 8.3.13 with Bootsrap 4.3.1 .

(我在Bootsrap 4.3.1中使用Angular 8.3.13 。)

Every time I navigate to a different page using router.navigate (this.router.navigate(["link"]) my bootstrap carousel swipe stops working for mobile until I click the carousel indicator ( See Video ). On the initial load, the carousel swipe works fine.

(每次我使用router.navigate (this.router.navigate(["link"])导航到另一个页面时,我的引导轮播滑动就会停止在移动设备上运行,直到我点击轮播指示器( 请参见视频 )。轮播滑动效果很好。)

Now, the weird thing is if I use href instead of router.navigate the carousel swipe works fine.

(现在,奇怪的是,如果我使用href而不是router.navigate,轮播滑动效果很好。)

There's no error in the console so I'm not sure where to look.

(控制台中没有错误,所以我不确定要看哪里。)

This bug appear even using the example code from bootstrap Boostrap Carousel .

(即使使用Bootstrap Boostrap Carousel中的示例代码, 也会出现此错误。)

Any suggestions on how to deal with this bug?

(有关如何处理此错误的任何建议?)

Is destroying the component completely possible every time I navigate using router.navigate to imitate a page refresh?

(每次我使用router.navigate模仿页面刷新进行导航时,是否完全有可能破坏组件?)

Edit: ng-bootstrap carousel swipe is also not working.

(编辑: ng-bootstrap轮播滑动也不起作用。)

  ask by Sherwin Abla?a Dapito translate from so

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

1.4m articles

1.4m replys

5 comments

56.8k users

...