Security News
PyPI Introduces Digital Attestations to Strengthen Python Package Security
PyPI now supports digital attestations, enhancing security and trust by allowing package maintainers to verify the authenticity of Python packages.
ngx-free-fullpage
Advanced tools
ngx-free-fullpage is a free-for-profit angular library that gives you all the tools you need to implement a fullpage scroll effect. This library hasn't been developed in order to substitute the current ngx-fullpage, this library is an alternative for thos
ngx-free-fullpage is a free-for-profit angular library that gives you all the tools you need to implement a fullpage scroll effect. This library hasn't been developed in order to substitute the current ngx-fullpage, this library is an alternative for those projects that are seeking a free library to implement this effect.
Run npm i ngx-free-fullpage
to install the library.
This library is based on directives in order to give you a simple way of implementing the different components of this effect. Now lets see the code:
Firstly, we must import the main module of the library NgxFullpageModule
, this module contains the minimal directives, which are NgxFullpageWrapperDirective
and NgxFullpageSectionDirective
. Their selectors are respectively, ngx-fullpage-wrapper
and ngx-fullpage-section
.
So our app.module.ts
(or other module) should be like this
imports: [
//Your other imports,
NgxFullpageModule,
];
and our whatever.component.html
must be kind of:
<!--class 'fullscreen' must be created by yourself-->
<div class="fullscreen" ngx-fullpage-wrapper>
<div ngx-fullpage-section>
This is the first section
</div>
<div ngx-fullpage-section>
This is second
</div>
<div ngx-fullpage-section>
I'm the last one =(
</div>
</div>
With this code, the effect would be implemented but if you need some other feautures check the section below out.
ngx-fullpage-wrapper
directivengx-fullpage-next-button
and ngx-fullpage-prev-button
directives add to the element which are attribute of an onclick event that when is triggered it scrolls to the next (or previous) section. These directives are both imported by NgxFullpageNextButtonModule
.
<button ngx-fullpage-next-button>Next</button> ## Incorrect, it must be inside ngx-fullpage-wrapper
<div class="fullscreen" ngx-fullpage-wrapper>
<button ngx-fullpage-next-button>Next</button> ## Correct
<div ngx-fullpage-section>
This is the first section
</div>
<div ngx-fullpage-section>
This is second
</div>
<div ngx-fullpage-section>
I'm the last one =(
</div>
</div>
ngx-fullpage-go-to-first
and ngx-fullpage-go-to-last
directives add to the element which are attribute of an onclick event that when is triggered it scrolls to the first/last section. These directives are imported by NgxFullpageToFirstButtonModule
and NgxFullpageGoToLastModule
respectively.
<div class="fullscreen" ngx-fullpage-wrapper>
<button ngx-fullpage-go-to-first>Next</button> ## Correct
<div ngx-fullpage-section>
This is the first section
</div>
<div ngx-fullpage-section>
This is second
</div>
<div ngx-fullpage-section>
I'm the last one =(
</div>
</div>
ngx-fullpage-go-to-section
which receives a section number (starting in 0) and add to the element which is attribute of an onclick event that when is triggered it scrolls to the given section. This directive is imported by NgxFullpageGoToSectionModule
.
There are several things that will be implemented in a near future but we haven't done yet, these are some examples.
This library provides you with essential tools in order to implement this effect. But if this is not enough and you need to implement some other features I am gonna ease the process to you. With this aim, I have to explain how the library internally works.
The library is just a set of directives connected by a common service. These directives has a hierarchy because we must put all the directives wrapped inside the root directive (ngx-fullpage-wrapper
). Why is this necesary? This is due to the way we inject the common service (NgxFullpageService
). In order to make possible the coexistence of several ngx-fullpage-wrapper
in the same page this how I inject NgxFullpageService
.
This is code of ngx-fullpage-wrapper
:
@Directive({
selector: '[ngx-fullpage-wrapper]',
providers: [NgxFullpageService] // This is what we are interested in.
})
After explaining this, now I can explain how I can ease you implemeting new features. NgxFullpageService
has several implemented functions in order to control the current section. So, as I explained above, the directives inside the ngx-fullpage-wrapper
have access to the instance of the NgxFullpageService
, so in order to create new features I gave access to NgxFullpageService
exporting among the modules.
The process to create a new feature would be:
NgxFullpageService
.NgxFullpageService
and your directive logic to implement your feature.
FAQs
ngx-free-fullpage is a free-for-profit angular library that gives you all the tools you need to implement a fullpage scroll effect. This library hasn't been developed in order to substitute the current ngx-fullpage, this library is an alternative for thos
We found that ngx-free-fullpage demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
PyPI now supports digital attestations, enhancing security and trust by allowing package maintainers to verify the authenticity of Python packages.
Security News
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.