File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
projects/ngfe/src/lib/core Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ import { FeForm } from './fe-form';
9
9
} )
10
10
export class FeSubmit {
11
11
@Output ( ) feSubmit = new EventEmitter ( ) ;
12
+ @Output ( ) invalid = new EventEmitter ( ) ;
12
13
13
14
constructor (
14
15
@Optional ( ) @Inject ( FeForm ) private form : FeForm ,
@@ -23,6 +24,8 @@ export class FeSubmit {
23
24
this . form . touchAll ( ) ;
24
25
if ( this . form . valid ) {
25
26
this . feSubmit . emit ( ) ;
27
+ } else {
28
+ this . invalid . emit ( ) ;
26
29
}
27
30
return false ;
28
31
}
@@ -35,6 +38,7 @@ export class FeSubmit {
35
38
} )
36
39
export class FeFormSubmit {
37
40
@Output ( ) feSubmit = new EventEmitter ( ) ;
41
+ @Output ( ) invalid = new EventEmitter ( ) ;
38
42
39
43
constructor (
40
44
@Inject ( FeForm ) private group : FeForm ,
@@ -45,6 +49,8 @@ export class FeFormSubmit {
45
49
this . group . touchAll ( ) ;
46
50
if ( this . group . valid ) {
47
51
this . feSubmit . emit ( ) ;
52
+ } else {
53
+ this . invalid . emit ( ) ;
48
54
}
49
55
}
50
56
}
You can’t perform that action at this time.
0 commit comments