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-parallax4ng
Usage
Adding the module
; // import the module @
Adding the simple-parallax
custom markup
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