New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@larscom/ngx-translate-module-loader

Package Overview
Dependencies
Maintainers
1
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@larscom/ngx-translate-module-loader - npm Package Compare versions

Comparing version 3.0.7 to 3.1.0

7

lib/module-translation-options.d.ts

@@ -0,1 +1,2 @@

import { HttpHeaders } from '@angular/common/http';
import { IModuleTranslation } from './module-translation';

@@ -37,2 +38,8 @@ import { Translation } from './translation';

translateMerger?: (translations: Translation[]) => Translation;
/**
* Provide custom headers at 'root' level, which means this headers gets added to every request
* unless you specify headers at 'module' level.
* @see modules
*/
headers?: HttpHeaders;
}

@@ -0,1 +1,2 @@

import { HttpHeaders } from '@angular/common/http';
import { Translation } from './translation';

@@ -43,2 +44,6 @@ export interface IModuleTranslation {

pathTemplate?: string;
/**
* Provide custom headers at 'module' level. These headers only apply to this module.
*/
headers?: HttpHeaders;
}

2

package.json
{
"name": "@larscom/ngx-translate-module-loader",
"version": "3.0.7",
"version": "3.1.0",
"description": "Highly configurable and flexible translations loader for ngx-translate. Fetch multiple translations, each translation file gets it's own namespace by default",

@@ -5,0 +5,0 @@ "repository": {

@@ -135,3 +135,3 @@ # @larscom/ngx-translate-module-loader

```ts
export interface IModuleTranslationOptions {
interface IModuleTranslationOptions {
/**

@@ -170,2 +170,8 @@ * The translation module configurations

translateMerger?: (translations: Translation[]) => Translation;
/**
* Provide custom headers at 'root' level, which means this headers gets added to every request
* unless you specify headers at 'module' level.
* @see modules
*/
headers?: HttpHeaders;
}

@@ -175,3 +181,3 @@ ```

```ts
export interface IModuleTranslation {
interface IModuleTranslation {
/**

@@ -217,2 +223,6 @@ * The module name

pathTemplate?: string;
/**
* Provide custom headers at 'module' level. These headers only apply to this module.
*/
headers?: HttpHeaders;
}

@@ -241,1 +251,16 @@ ```

```
## Custom headers
```ts
const options: IModuleTranslationOptions = {
// global headers, applied to every request, unless you specify headers at 'module' level
headers: new HttpHeaders().set('Header-Name', 'Header value')
modules: [
{ baseTranslateUrl },
// headers only applied to this module
{ baseTranslateUrl, moduleName: 'feature1', headers: new HttpHeaders().set('Header-Name', 'Header value') },
{ baseTranslateUrl, moduleName: 'feature2' }
]
};
```

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc