open-index/open-npm huggingface dataset:
npm package: @gambleon/ng-commons
Description: Common Models and Services for Angular Single Page Applications (SPAs)
Latest version: 1.0.0-2

# ng-commons

Common Models and Services for Angular Single Page Applications (SPAs)

## Models

### KeyValuePairs
* KeyValuePair<T>

Json example: 

```json
[
	{
		"key": "winter",
		"value": "Winter"
	}, 
	{
		"key": "spring",
		"value": "Frühling"
	},
	{
		"key": "summer",
		"value": "Sommer"
	},
	{
		"key": "autumn",
		"value": "Herbst"
	}
]
```

### Dictionaries

A more compact representation for a key-value-pair mapping.

Can be iterated in angular using the `| keyvalue`-pipe

* Dictionary<T>

Json example:

```json
{
	"winter": "Winter",
	"spring": "Frühling",
	"summer": "Sommer",
	"autumn": "Herbst"
}
```

### Other Models

* Notification

Contain the message and status (isSuccess) delivered by the NotificationService.

## Services

### NotificationService

Ability to dispatch messages using `onSuccess()` and `onError()` which can be received by subscribing to `getNotification()`.

The status of the Notification can be used to alter the visual appearance.