Skip to content
Vadim Fedorenko edited this page Apr 19, 2017 · 7 revisions

Angular CLI usage

  1. Create new project (if you starting from scratch)
ng new project-name
cd project-name
  1. Install ngx-fullpage
npm install ngx-fullpage
  1. Import MnFullpageModule module
// ... Other imports ...
import { MnFullpageModule } from 'ngx-fullpage';


@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    BrowserModule,
    FormsModule,
    HttpModule,
    MnFullpageModule.forRoot() // Don't forget to call .forRoot() static method
  ],
  providers: [],
  bootstrap: [ AppComponent ]
})
export class AppModule { }
  1. Update app.component.html template
<div mnFullpage>
  <div class="section welcome-section fp-section fp-table">
    <div class="fp-tableCell">
      1
    </div>
  </div>
  <div class="section welcome-section fp-section fp-table">
    <div class="fp-tableCell">
      2
    </div>
  </div>
  <div class="section welcome-section fp-section fp-table">
    <div class="fp-tableCell">
      3
    </div>
  </div>
</div>
  1. Update scripts section in .angular-cli.json with jquery and fullpage.js modules path
{
  "project": {
    "name": "project-name"
  },
  "apps": [
    {
      
      "scripts": [
        "../node_modules/jquery/dist/jquery.js",
        "../node_modules/fullpage.js/dist/jquery.fullpage.js"
      ], 
        
    }
  ]
  1. You are done. Run npm start !
Clone this wiki locally