I tried for simple design in app component HTML for dropdown. Installed bootstrap and Jquery as well. And also i have a bit of js snipped for dropdown caret change.
Here my 'index.html, Angular-cli.Json, Style.scss, appcomponent html, carettest.js files' shared. Please tell whether it is fine or i need to add path or reference in anywhere else.
angualr-cli.json
"styles": [
"styles.scss",
"../node_modules/bootstrap/dist/css/bootstrap.min.css",
"../node_modules/jquery/dist/css/jquery.min.css"
],
"scripts": [
"../node_modules/bootstrap/dist/js/bootstrap.min.js",
"./src/assets/JSfiles/carettest.js" ],
style.scss
@import "~bootstrap/dist/css/bootstrap.min.css";
@import "~font-awesome/css/font-awesome.css";
.caret.caret-up {
border-top-width: 0;
border-bottom: 4px solid #fff;
}
index.Html
appcomponent.html
Change the caret symbol on dropdown
carettest.js
$(document).ready(function(){
$(".dropdown").on("hide.bs.dropdown", function(){
$(".btn").html('Dropdown ');
});
$(".dropdown").on("show.bs.dropdown", function(){
$(".btn").html('Dropdown ');
});
});
Laxmidhar SahooPosted Dec 7, 2017, 7:14 AM
SeethaParthaPosted Dec 7, 2017, 6:58 AM
Laxmidhar SahooPosted Dec 6, 2017, 6:30 AM
Laxmidhar SahooPosted Dec 6, 2017, 5:33 AM
SeethaParthaPosted Dec 6, 2017, 3:12 AM
Laxmidhar SahooPosted Dec 5, 2017, 4:14 AM