I don't know what about you, but solution was pretty simple.
Many thanks to Sathish kumar Ramalingam
<https://www.youtube.com/channel/UCo1uXpOZneIU6kkzzPvj5oQ> for his video
tutorial <https://www.youtube.com/watch?v=yXgDKQn-qYI>
Short manual how to implement any js/jquery lib into your angular project:
1) Download the lib and paste it into some folder of your project.
2) Set dependencies in the ".angular-cli.json" file for your lib.
3) In your "app.component.ts" file add this stuff:
import { Component, OnInit } from '@angular/core'; // <-- add OnInit
declare const $; // <-- declare const for jQuery $
declare const Swiper; // <-- declare const for Swiper
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.scss']
})
export class AppComponent implements OnInit { // <-- OnInit implementation
ngOnInit(): void { // <-- OnInit void
$(function() { // <-- jQuery function
var mySwiper = new Swiper ('.swiper-container', { // <-- Swiper options
// Optional parameters
loop: true,
pagination: {
el: '.swiper-pagination',
},
navigation: {
nextEl: '.swiper-button-next',
prevEl: '.swiper-button-prev',
}
});
});
}
}
I hope this helps someone.
--
You received this message because you are subscribed to the Google Groups
"Angular and AngularJS discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.