Comments (11)
@spekkie2002 - can you try installing the @next
build again and see if the is fixed? Thanks!
from ng-bootstrap-form-validation.
Thanks for testing and creating the issue!
Can you please share what the exact dev build of the module this was with from your package.json
file?
from ng-bootstrap-form-validation.
And maybe also what your main app module looks like?
from ng-bootstrap-form-validation.
Sure! Thanks for answering this quickly! :-)
"ng-bootstrap-form-validation": "^2.1.0-dev.20180908141610544Z.2a863f6dca92772ca67ca490f5ea48aab0917975",
app.module.ts:
import { BrowserModule } from '@angular/platform-browser';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { NgModule } from '@angular/core';
import { HttpClientModule, HTTP_INTERCEPTORS } from '@angular/common/http';
import { ToastrModule } from 'ngx-toastr';
import { NgxSpinnerModule } from 'ngx-spinner';
import { NgBootstrapFormValidationModule } from 'ng-bootstrap-form-validation';
import { AppComponent } from './app.component';
import { AppRoutingModule } from './app-routing.module';
import { LayoutsModule } from './shared/layouts/layouts.module';
import * as fromInterceptors from './shared/interceptors';
import { InfoService } from './shared/services/info-service.service';
import { ShortDatePipe } from './shared/pipes/short-date.pipe';
@NgModule({
declarations: [AppComponent, ShortDatePipe],
imports: [
BrowserModule,
BrowserAnimationsModule,
AppRoutingModule,
HttpClientModule,
LayoutsModule,
ToastrModule.forRoot({
positionClass: 'toast-top-md',
enableHtml: true,
}),
NgxSpinnerModule,
NgBootstrapFormValidationModule.forRoot(),
],
providers: [
InfoService,
{
provide: HTTP_INTERCEPTORS,
useClass: fromInterceptors.ErrorInterceptor,
multi: true,
},
{
provide: HTTP_INTERCEPTORS,
useClass: fromInterceptors.TokenInterceptor,
multi: true,
},
],
bootstrap: [AppComponent],
})
export class AppModule {}
from ng-bootstrap-form-validation.
@spekkie2002 I too ran into this error recently. I still haven't found a root cause, but will report back if I do.
from ng-bootstrap-form-validation.
@kingcody - looks like the | null
here is causing the issue. If I remove it, I don't get the error. Any idea how we can define that type to be nullable and still resolve correctly within the DI framework? It's already being decorated with @Optional()
, so I'm not sure why it's not working? 🤷♂️
from ng-bootstrap-form-validation.
Looks like this might be related? angular/angular#25544
from ng-bootstrap-form-validation.
@third774 you're correct, I'm actually in the process of testing around that in my local. Technically, by default null
and undefined
are assignable to all types in TypeScript, so I'm not sure that typing is providing anything. Do you have any insight as to why it was included with #45 ?
from ng-bootstrap-form-validation.
Just merged this PR which should fix the issue - #49
from ng-bootstrap-form-validation.
@kingcody Ah, crap. I forgot that strictNullChecks
was a compiler flag that is not on by default. Thanks.
from ng-bootstrap-form-validation.
@third774 That did the trick!
Awesome! Thanks a lot, i really appreciate it!
from ng-bootstrap-form-validation.
Related Issues (20)
- How disable multiple error messages
- how to incorporate debouncy behavior preventing double submit
- Issue with [formControl] input HOT 1
- How to apply to checkbox with custom error message
- License text not package in node_modules
- Project is dead?
- Ability to hide error messages inside <bfv-messages></bfv-messages> HOT 2
- [Question] ngx-translate support? HOT 3
- [Question] Don't show validation errors until first submit
- Support Angular 8 HOT 1
- [Feature Request] Surface error value in CustomErrorMessages array
- [Question] Example for server-side errors
- [Question] Disable validation for some fields HOT 1
- [QUESTION] How can i get requiredLength attribute of Validators.minLength when i format error message
- [Question] How to work with cross field validation HOT 1
- [Question] setErrors doesn't show messages.
- Support Angular 9 HOT 9
- Async validator don't call validSubmit function HOT 2
- Error message not showing when compiling with Ivy angular 9 HOT 3
- Custom error on form control with custom validator (AbstractControl, ValidatorFn)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ng-bootstrap-form-validation.