0.1.1 • Published 8 years ago
simple-parallax4ng v0.1.1
simple-parallax4ng
create a simple parallax background effect; designed to be consumed by Angular with Typescript applications
Development server
Run npm start or ng serve for demo server. Navigate to http://localhost:4200/.
Install
Install the library
npm install -D simple-parallax4ngUsage
Adding the module
import { SimpleParallaxModule } from 'simple-parallax4ng'; // import the module
@NgModule({
declarations: [AppComponent],
imports: [
BrowserModule,
SimpleParallaxModule // import the module
],
bootstrap: [AppComponent]
})
export class AppModule { }Adding the simple-parallax custom markup
<simple-parallax
eleId="slide1"
bgUrl="url(../assets/images/wp1.jpg)"
height=100
style="color:antiquewhite">
</simple-parallax>API Information
eleId- unique element identifierbgUrl- location of the background image, used with url() function;bgColor- apply solid color background;paraBackground: scroll or fixed- effect of the backgroundheight: number- height of the backgroundpadding- padding information
Build
Run npm run build to build the project. The build artifacts will be stored in the dist/ directory.
Running unit tests
Run ng test to execute the unit tests via Karma.
Running end-to-end tests
Run ng e2e to execute the end-to-end tests via Protractor.
Before running the tests make sure you are serving the app via ng serve.
License
MIT
0.1.1
8 years ago