如何在Angular2网页包初学者工具包中包含引导混搭
从angular2的基本webpack初学者开始,我在ng2 boostrap中添加了以下内容,只需将其包含在index.html中:如何在Angular2网页包初学者工具包中包含引导混搭,angular,webpack,ng2-bootstrap,Angular,Webpack,Ng2 Bootstrap,从angular2的基本webpack初学者开始,我在ng2 boostrap中添加了以下内容,只需将其包含在index.html中: <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet"> 然后我看到了一个很好的日期选择器,它添加了 <alert type="info">Hello from ng2-bootst
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet">
然后我看到了一个很好的日期选择器,它添加了
<alert type="info">Hello from ng2-bootstrap {{ date.toDateString() }}</alert>
<div style="display:inline-block; min-height:290px;">
<datepicker [(ngModel)]="date" showWeeks="true"></datepicker>
</div>
我立刻明白:
Module build failed:
@include button-variant($btnText, $btnFacebookBackgroundHighlight, $btnFacebookBackgroundHighlight);
^
No mixin named button-variant
作为webpack和angular2的新成员,我对如何将这些混音添加到构建中有点不知所措。非常感谢你的帮助 以便在scss文件中使用引导混合 1-您需要安装引导程序
npm install bootstrap
2-您需要在scss文件中包含mixin文件
在您的scss文件中:
@import '~bootstrap/scss/_variables'
@import '~bootstrap/scss/_utilities'
@import '~bootstrap/scss/mixins/_buttons';
@include button-variant(); // use it
非常感谢!最后我还需要一点:
@import'~bootstrap/scss/_mixins'@导入“~bootstrap/scss/_变量”@导入“~bootstrap/scss/_实用程序”代码>
npm install bootstrap
@import '~bootstrap/scss/_variables'
@import '~bootstrap/scss/_utilities'
@import '~bootstrap/scss/mixins/_buttons';
@include button-variant(); // use it