滚动不起作用

时间:2017-06-02 11:34:22

标签: angular perfect-scrollbar

我试图使用angular2-perfect-scrollbar

我在div中使用它,它可以工作,但在div主卷轴的末尾应该可以工作,它不起作用。

当div的内容结束时,主滚动应该有效。

app.module.ts

import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { HttpModule } from '@angular/http';
import { AppComponent } from './app.component';
import { OptionsComponent } from './options/options.component';
import { InclusionsComponent } from './inclusions/inclusions.component';
import { PerfectScrollbarModule } from 'angular2-perfect-scrollbar';
import { PerfectScrollbarConfigInterface } from 'angular2-perfect-scrollbar';
@NgModule({
  declarations: [
    AppComponent,
    OptionsComponent,
    InclusionsComponent,
  ],
  imports: [
    BrowserModule,
    FormsModule,
    HttpModule,
    PerfectScrollbarModule.forRoot(PERFECT_SCROLLBAR_CONFIG)
  ],
  providers: [QuoteService],
  bootstrap: [AppComponent]
})
export class AppModule { }

inclusions.component.ts (我试图使用完美滚动的地方)

import { Component, OnInit } from '@angular/core';
import { PerfectScrollbarModule } from 'angular2-perfect-scrollbar';
import { PerfectScrollbarConfigInterface } from 'angular2-perfect-scrollbar';
@Component({
  selector: 'inclusions',
  templateUrl: './inclusions.component.html',
  styleUrls: ['./inclusions.component.css']
})
export class InclusionsComponent implements OnInit {
  constructor() {
   }
    ngOnInit() {
  }
}

inclusions.component.html

<div class="item active">
   <div class="row">
      <div class="container">
         <div class="col-md-4 col-xs-4 col-sm-4">
            <div class="inclusions_bx_detail">
               <div class="inclusions_bx_detail_title">
                  <div class="inclusions_bx_detail_title_icon">
                     <img src="assets/images/inclusions_icon1.jpg" alt="">
                  </div>
                  <h3>hotel stay information</h3>
                  <span>Accomodation And Dining</span>
               </div>
               <div class="inclusions_detail_img ">
                  <img src="assets/images/inclusions_img1.jpg" alt="">
               </div>
               <div class="inclusions_detail_img_info "  [perfect-scrollbar]="config">
                  <div class="inclusions_detail_img_info_in">
                     <img src="assets/images/inclusions_img_icon1.png" alt="">
                     <span>2 Nights in Pattaya (Day 1, 2)</span>
                  </div>
                  <div class="inclusions_detail_img_info_in">
                     <img src="assets/images/inclusions_img_icon1.png" alt="">
                     <span>2 Nights in Bangkok (Day 3, 4)</span>
                  </div>
                  <div class="inclusions_detail_img_info_in">
                     <img src="assets/images/inclusions_img_icon1.png" alt="">
                     <span>4 ABFs (Day 1, 2, 3 ,4)</span>
                  </div>
               </div>
            </div>
         </div>

      </div>
   </div>
</div>

0 个答案:

没有答案