Holiday Notice: Support will be provided on a limited scale from December 24th, 2024, to January 2nd, 2025. Happy holidays and a wonderful New Year!


Topic: Unable to load notification

wolexie free asked 5 years ago


Expected behavior I tried showing a notification on a page that has previously worked but no long displays if not on the home page of my application.

Actual behavior ERROR TypeError: Cannot read property 'nativeElement' of null at MdbInputDirective.ngAfterViewInit (ng-uikit-pro-standard.js:6447) Resources (screenshots, code snippets etc.)


Bartosz Termena staff commented 5 years ago

Hi!

I can not reproduce your problem. Could you show me your code or send demo-app to my email: b.termena@mdbootstrap.com ?

Best Regards, Bartosz.


wolexie free commented 5 years ago

I sent you a link to share the project source with you on azure devops


Arkadiusz Idzikowski staff answered 5 years ago


Please update your code and use mdbInput directive instead (and mdbValidate if you need validation as well). MdbInputDirective is deprecated and will be removed in the future versions.


synap pro answered 5 years ago


I'm getting a similar error with 8.8.0 when trying to use the mdbInputDirective:

ERROR TypeError: Cannot read property 'nativeElement' of null at MdbInputDirective.ngAfterViewInit (ng-uikit-pro-standard.js:6475) at callProviderLifecycles (core.js:32328) at callElementProvidersLifecycles (core.js:32293) at callLifecycleHooksChildrenFirst (core.js:32275) at checkAndUpdateView (core.js:44281) at callViewAction (core.js:44637) at execComponentViewsAction (core.js:44565) at checkAndUpdateView (core.js:44278) at callViewAction (core.js:44637) at execComponentViewsAction (core.js:44565)


Konrad Stępień staff commented 5 years ago

Hi @synap,

Can you send me part of your code? Or Maybe example from our documentation.

Please try something like this. For me, this code works correctly.

<div class="md-form">
  <mdb-icon fas icon="envelope" class="prefix"></mdb-icon>
  <input type="email" class="form-control" id="basicExample" mdbInput>
  <label for="basicExample">Type your email</label>
</div>

Best, Konrad.


ewgiddings free commented 5 years ago

@synap I was having a similar issue and I think the wording "mdbInputDirective" has been replaced by simply "mdbInput". When I replaced all of them my similar error went away.



Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Answered

Specification of the issue

  • ForumUser: Free
  • Premium support: No
  • Technology: MDB Angular
  • MDB Version: 8.3.1
  • Device: Desktop
  • Browser: Chrome
  • OS: Windows 10
  • Provided sample code: No
  • Provided link: No