Guest User

Untitled

a guest
Jan 23rd, 2018
287
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.84 KB | None | 0 0
  1. Unhandled Promise rejection: Template parse errors:
  2. 'auth' is not a known element:
  3. 1. If 'auth' is an Angular component, then verify that it is part of this module.
  4. 2. To allow any element add 'NO_ERRORS_SCHEMA' to the '@NgModule.schemas' of this component. ("ystem.import('public/app/auth').catch(function (err) { console.error(err); });</script></head><body>[ERROR ->]<auth><div class="progress-container"><div class="progress"><div class="indeterminate"></div></div></"): ng:///success-snackBar.component@0:861 ; Zone: <root> ; Task: Promise.then ; Value: Error: Template parse errors:
  5.  
  6. import {Component, ViewContainerRef} from "@angular/core";
  7. @Component({
  8. selector: 'auth',
  9. templateUrl: './auth.component'
  10. })
  11. export class AuthComponent {
  12. }
  13.  
  14. <head>
  15. <script src='systemjs.config.js'></script>
  16. <script>
  17. System.import('public/app/auth').catch(function (err) { console.error(err); })
  18. </script>
  19. </head>
  20. <body>
  21. <auth></auth> // the selector is used here and the error comes from here
  22. </body>
  23.  
  24. import {NgModule} from "@angular/core";
  25. import {CommonModule} from "@angular/common";
  26. import {FormsModule} from "@angular/forms";
  27. import {BrowserModule} from "@angular/platform-browser";
  28. import {LoginModule} from "./login/login.module";
  29. import {AuthService} from "./auth.service";
  30. import {BrowserAnimationsModule} from "@angular/platform-browser/animations";
  31. import {AuthComponent} from "./auth/auth.component";
  32. import {HttpClientModule} from "@angular/common/http";
  33.  
  34. @NgModule({
  35. imports: [
  36. BrowserModule,
  37. CommonModule,
  38. BrowserAnimationsModule,
  39. FormsModule,
  40. LoginModule,
  41. HttpClientModule
  42. ],
  43. declarations: [
  44. AuthComponent
  45. ],
  46. providers: [
  47. AuthService
  48. ],
  49. exports: [
  50. AuthComponent
  51. ],
  52. bootstrap: [AuthComponent]
  53. })
  54. export class AuthModule {
  55. }
Add Comment
Please, Sign In to add comment