@protobuf-ts/runtime-angular
Advanced tools
Comparing version 1.0.1 to 1.0.2
{ | ||
"name": "@protobuf-ts/runtime-angular", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "Runtime library for using protobuf-ts with angular", | ||
@@ -27,5 +27,5 @@ "license": "Apache-2.0", | ||
"@angular/core": ">=8.0.0 <=11.0.0", | ||
"@protobuf-ts/runtime": "1.0.1", | ||
"@protobuf-ts/runtime-rpc": "1.0.1", | ||
"@protobuf-ts/twirp-transport": "1.0.1", | ||
"@protobuf-ts/runtime": "1.0.2", | ||
"@protobuf-ts/runtime-rpc": "1.0.2", | ||
"@protobuf-ts/twirp-transport": "1.0.2", | ||
"rxjs": "~6.5.5" | ||
@@ -32,0 +32,0 @@ }, |
@protobuf-ts/runtime-angular | ||
============================ | ||
Runtime library for using [protobuf-ts](https://github.com/timostamm/protobuf-ts/blob/master/README.md) with Angular. | ||
Runtime library for using [protobuf-ts](https://github.com/timostamm/protobuf-ts/) with Angular. | ||
If you generate code with the protobuf-ts plugin and the `enable_angular_annotations` | ||
option, or if you want to use the `PbDatePipe` to format `google.protobuf.Timestamp` | ||
or `google.type.DateTime` like a JavaScript Date, you need this package as a dependency: | ||
Installation: | ||
```shell script | ||
npm i @protobuf-ts/runtime-angular | ||
npm i @protobuf-ts/runtime @protobuf-ts/runtime-rpc @protobuf-ts/runtime-angular @protobuf-ts/twirp-transport | ||
``` | ||
You probably want the protoc plugin as well: | ||
```shell script | ||
npm i -D @protobuf-ts/plugin | ||
``` | ||
The features provided by this package are documented in the [MANUAL](https://github.com/timostamm/protobuf-ts/blob/master/MANUAL.md#angular-support). | ||
For a quick overview of `protobuf-ts`, check the repository [README](https://github.com/timostamm/protobuf-ts/blob/master/README.md). | ||
Usage: | ||
- generate code | ||
```shell script | ||
npx protoc --ts_opt enable_angular_annotations --ts_out src/ my-message.proto | ||
``` | ||
- import the `PbDatePipeModule` to get the date pipe that works with | ||
`google.protobuf.Timestamp` or `google.type.DateTime` | ||
- import `TwirpModule.forRoot()` to get a Twirp transport that uses the Angular `HttpClient` | ||
To learn more, please read the [MANUAL](https://github.com/timostamm/protobuf-ts/blob/master/MANUAL.md#angular-support) | ||
or check the repository [README](https://github.com/timostamm/protobuf-ts/README.md) for a quick overview. | ||
#### Building this project | ||
@@ -20,0 +36,0 @@ |
250897
44