
Security News
Package Maintainers Call for Improvements to GitHub’s New npm Security Plan
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.
@acpaas-ui/ngx-context
Advanced tools
This package manages meta tags and other SEO properties.
import { ContextModule, ContextService } from '@acpaas-ui/ngx-context';
Visit our documentation site for full how-to docs and guidelines
You can set defaults and other options for the module by using the forRoot()
option in the import section:
Name | Default value | Description |
---|---|---|
useTitleSuffix: boolean; | false | Add an optional title suffix. |
extendTitle: boolean; | false | Append parent page titles (when using router context). |
titleDelimiter: string; | `' | '` |
defaults: Context; | {} | Default values for the meta tags. Have a look at the list down below for an overview of possible tags. |
routerContext: boolean; | true | Listen for meta data on the route changes. |
@NgModule({
imports: [
ContextModule.forRoot({
useTitleSuffix: true,
extendTitle: true,
titleDelimiter: ' | ',
defaults: {
titleSuffix: 'Context Module',
},
routerContext: true,
}),
]
})
You can set tags on routes using the data
property. The ContextService
will subscribe to the router and pick up these tags automatically.
export const CONTEXT_EXAMPLES_ROUTES: Routes = [
{
path: '',
component: ContextDemoPageComponent,
pathMatch: 'full',
data: {
meta: {
page: 'Context example page',
title: 'Context',
description: 'Description of the context example page',
metatags: 'Antwerp UI, Angular, context',
},
},
},
];
You can set tags manually in your components using the loadContext
method as well. This is useful for async data or generic routes.
import { ContextService } from '@acpaas-ui/ngx-context';
@Component({
providers: [
ContextService,
],
})
export class ContextDemoPageComponent {
constructor(private contextService: ContextService) {}
public setTitle() {
this.contextService.updateContext({
title: 'New context example title',
});
}
}
<button class="a-button" (click)="setTitle()">Set title</button>
The most used tags are available in the Context
interface. You are however, free to use whichever tag you need in the format [key: string]: string;
.
title
titleSuffix
description
favIcon
og:url
og:type
og:title
og:description
og:image
fb:app_id
og:locale
og:locale:alternate
og:see_also
og:updated_time
twitter:card
twitter:site
twitter:creator
Visit our Contribution Guidelines for more information on how to contribute.
FAQs
This package manages meta tags and other SEO properties.
The npm package @acpaas-ui/ngx-context receives a total of 32 weekly downloads. As such, @acpaas-ui/ngx-context popularity was classified as not popular.
We found that @acpaas-ui/ngx-context demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 8 open source maintainers 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
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.
Product
Socket Firewall is a free tool that blocks malicious packages at install time, giving developers proactive protection against rising supply chain attacks.
Research
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.