Skip to content
This repository was archived by the owner on May 3, 2024. It is now read-only.

Commit 8b2b2e8

Browse files
Merge branch 'master' of https://github.com/ngspot/ngx-errors
2 parents 5892ca2 + 4dc57de commit 8b2b2e8

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

README.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@
1414

1515
> Reactive forms validation for pros
1616
17-
I solely missed `ng-messages` directive from AngularJs, so I created this one to use in Angular 2+.
18-
In contrast to the one from AngularJs, this one requires you to pass the control name to the directive, instead of its errors.
19-
This allowed me to hook in to the status of control, like its `dirty` state, and display validation messages according to that status.
20-
A nice side effect of that decision is less boilerplate code.
17+
I very much missed the `ng-messages` directive from AngularJS, so I created a similar set of directives to use in Angular 2+.
18+
In contrast to the directives from AngularJS, the directives in this library require passing the control name to the directive, instead of the control's errors.
19+
This allowed me to hook into the status of control, such as its `dirty` state, and display validation messages according to that status.
20+
The design of this library promotes less boilerplate code, which keeps your templates clean.
2121

2222
## Features
2323

@@ -46,20 +46,20 @@ A nice side effect of that decision is less boilerplate code.
4646

4747
## Usage
4848

49-
Import library into your application module:
49+
Import library into application module:
5050

5151
```ts
5252
import { NgxErrorsModule } from '@ngspot/ngx-errors'; // <-- import the module
5353

5454
@NgModule({
5555
imports: [
56-
NgxErrorsModule, // <-- include it in your app module
56+
NgxErrorsModule, // <-- include imported module in app module
5757
],
5858
})
5959
export class MyAppModule {}
6060
```
6161

62-
### Use-case with a form:
62+
### Use case with a form:
6363

6464
```ts
6565
@Component({
@@ -85,7 +85,7 @@ export class MyComponent implements OnInit {
8585
}
8686
```
8787

88-
### Use-case with a simple FormControl:
88+
### Use case with a simple FormControl:
8989

9090
```ts
9191
@Component({
@@ -105,7 +105,7 @@ export class MyComponent implements OnInit {
105105

106106
## Configuration
107107

108-
You configure when to show messages for your whole module by using `.configure()` method:
108+
Configure when to show messages for whole module by using `.configure()` method:
109109

110110
```ts
111111
@NgModule({
@@ -121,7 +121,7 @@ Alternatively, use dependency injection to provide configuration at a component
121121
```ts
122122
import { ErrorsConfiguration } from '@ngspot/ngx-errors';
123123

124-
const myConfig = { ... }; // <- specify your config
124+
const myConfig = { ... }; // <- specify config
125125

126126
@Component({
127127
...
@@ -132,7 +132,7 @@ const myConfig = { ... }; // <- specify your config
132132
export class MyComponent { }
133133
```
134134

135-
Here's configuration object interface:
135+
Here's the configuration object interface:
136136

137137
```ts
138138
interface IErrorsConfiguration {
@@ -157,7 +157,7 @@ interface IErrorsConfiguration {
157157

158158
## Styling
159159

160-
Just include something similar to the following in your global css file:
160+
Include something similar to the following in global CSS file:
161161

162162
```css
163163
[ngxerrors] {
@@ -172,17 +172,17 @@ Just include something similar to the following in your global css file:
172172
1. Develop
173173
1. Write specs
174174
1. Run `npm run test:lib`
175-
1. Run `npm run commit`, and choose fix or feature
175+
1. Run `npm run commit` and choose fix or feature
176176
1. Run `npm run release`
177177
1. Run `npm run build:lib`
178-
1. Go to the dist directory, and run `npm publish`
178+
1. Go to the dist directory and run `npm publish`
179179

180180
### Scripts
181181

182182
- `build:lib` - Builds the library
183183
- `test:lib` - Runs tests
184184
- `test:lib:headless` - Runs tests in headless mode with Chrome
185-
- `release` - Releases a new version. This will bump the library's version, and update the `CHANGE_LOG` file based on the commit message
185+
- `release` - Releases a new version; this will bump the library's version and update the `CHANGE_LOG` file based on the commit message
186186
- `release:first` - Creates the first release
187187
- `commit` - Creates a new commit message based on Angular commit message convention
188188
- `contributors:add` - Adds a new contributor to the `README` file

0 commit comments

Comments
 (0)