![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
ngx-marquee
Advanced tools
Powerful Marquee Component for Angular (based on observers behavior). Improved alternative to the deprecated HTML marquee tag.
This library was generated with Angular CLI.
Run npm i ngx-marquee
to install the library.
import { NgxMarqueeModule } from 'ngx-marquee';
@NgModule({
imports: [ NgxMarqueeModule ],
...
})
export class AppModule { }
<ngx-marquee>
<mark class="ticker-custom">My ticker content</mark>
</ngx-marquee>
Name | Type | Description |
---|---|---|
[direction] | string | Sets the controlling direction of marquee movement. |
[duration] | string | Sets the length of time that an animation takes to complete one cycle. |
[pauseOnHover] | boolean | Set to pause the marquee movement while hover user event. |
[animation] | string | Sets animation entrance when the marquee cycle starts. |
[pendingUpdates] | boolean | Indicates that taskOnUpdateContent callback function will be executed when the current movement cycle has been finished. |
[taskOnUpdateDuration] | function | Callback function to be used to determine the new duration value that an animation takes to complete the next cycle. This callback function will be executed if pendingUpdates property is set on true and the current cycle of marquee movement has been finished. |
[taskOnUpdateContent] | function | Callback function to be used to set new content in the next cycle. This callback function will be executed while pendingUpdates property is set on true and the current cycle of marquee movement has been finished. |
(pendingUpdatesChange) | boolean | This event indicates that the taskOnUpdateDuration or taskOnUpdateContent callbacks functions have been executed. |
(playStateChange) | MarqueeState | This event indicates the current state movement of the marquee. |
Name | Description |
---|---|
playPause | Toggle the movement of the marquee to play or pause. |
stop | Stop the movement of the marquee. |
restart | Restart the movement of the marquee to the initial move point. |
string
Property sets the controlling direction of marquee movement.
default value: "left"
Note: The
taskOnUpdateContent()
callback function is not fired whendirection
value is "alternate".
<ngx-marquee direction="right">
<mark>My ticker text</mark>
</ngx-marquee>
string
Property sets the length of time that an animation takes to complete one cycle.
default value: "20s"
Note: The duration string format must be a value preceded by a letter s or ms to denote time in seconds or milliseconds respectively.
<ngx-marquee duration="120s">
<mark>My ticker text</mark>
</ngx-marquee>
boolean
Property set to pause the marquee movement while hover user event.
default value: false
<ngx-marquee pauseOnHover="true">
<mark>My ticker text</mark>
</ngx-marquee>
string
Property sets animation entrance when the marquee cycle starts.
default value: "default"
Note: Only "default" animation is available when
direction
value is "alternate".
<ngx-marquee animation="slideInUp">
<mark>My ticker text</mark>
</ngx-marquee>
boolean
Property indicates that taskOnUpdateContent
callback function will be executed when the current movement cycle has been finished.
default value: false
<ngx-marquee pendingUpdates="false">
<mark>My ticker text</mark>
</ngx-marquee>
function
Customized callback function to be used to determine the new duration
value that an animation takes to complete the next cycle. This callback function will be executed if pendingUpdates
property is set on true and the current cycle of marquee movement has been finished.
return: string
Note: If taskOnUpdateDuration( ) function is not supplied, the
duration
value is considered.
foo = (): string => {
// Some imaginative lines about the new duration of your marquee
// ...
return "90ms";
};
<ngx-marquee [taskOnUpdateDuration]="foo" pendingUpdates="true">
<mark>My ticker text</mark>
</ngx-marquee>
function
Customized callback function to be used to set new content in the next cycle. This callback function will be executed while pendingUpdates
property is set on true and the current cycle of marquee movement has been finished.
return: void
Note: If taskOnUpdateContent( ) function is not supplied, the marquee remains unchanged.
anotherFoo = (): void => {
// Some imaginative lines about the new content of your marquee
// ...
};
<ngx-marquee [taskOnUpdateContent]="anotherFoo" pendingUpdates="true">
<mark>My ticker text</mark>
</ngx-marquee>
This event indicates that the taskOnUpdateDuration
or taskOnUpdateContent
callbacks functions have been executed.
return: EventEmitter<boolean>
Note: You can take advantage of two-way data binding pattern for update
pendingUpdates
value simultaneously between your component logic and the marquee.
<ngx-marquee [(pendingUpdates)]="isPendingUpdate" [taskOnUpdateContent]="anotherFoo">
<mark>My ticker text</mark>
</ngx-marquee>
This event indicates the current state movement of the marquee.
return: EventEmitter<MarqueeState>
Note: You can map these values to respective lowercase "running", "paused", or "stopped" string's value.
<ngx-marquee (playStateChange)="listenerFoo($event)">
<mark>My ticker text</mark>
</ngx-marquee>
Toggle the movement of the marquee to play or pause.
Note: Sets and emit (by
playStateChange
event) the currentMarqueeState
to Running or Paused.
Stop the movement of the marquee.
Note: Sets and emit (by
playStateChange
event) the currentMarqueeState
to Stopped. Also, set the marquee to the initial move point and set the value ofpendingUpdates
to false.
Restart the movement of the marquee to the initial move point.
Note: Sets and emit (by
playStateChange
event) the currentMarqueeState
to Running.
Inspired by https://github.com/shivarajnaidu/ng-marquee
FAQs
Powerful Marquee for Angular (based on observers behavior)
The npm package ngx-marquee receives a total of 692 weekly downloads. As such, ngx-marquee popularity was classified as not popular.
We found that ngx-marquee 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
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.