Guest User

Untitled

a guest
Feb 7th, 2018
356
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.51 KB | None | 0 0
  1. Angular CLI: 1.6.1
  2. Node: 8.9.4
  3. OS: win32 x64
  4. Angular: 5.1.1
  5. ... animations, common, compiler, compiler-cli, core, forms
  6. ... http, language-service, platform-browser
  7. ... platform-browser-dynamic, router
  8.  
  9. @angular/cli: 1.6.1
  10. @angular-devkit/build-optimizer: 0.0.38
  11. @angular-devkit/core: 0.0.23
  12. @angular-devkit/schematics: 0.0.42
  13. @ngtools/json-schema: 1.1.0
  14. @ngtools/webpack: 1.9.1
  15. @schematics/angular: 0.1.13
  16. typescript: 2.4.2
  17. webpack: 3.10.0
  18.  
  19. Failed to compile.
  20.  
  21. ./src/app/pages/auth-admin/auth-admin.module.ts
  22. Module not found: Error: Can't resolve '@angular/platform-browser/src/browser' in 'C:WORKAppAngularDevContractorsClubsrcapppagesauth-admin'
  23. @ ./src/app/pages/auth-admin/auth-admin.module.ts 19:0-70
  24. @ ./src/$$_lazy_route_resource lazy
  25. @ ./node_modules/@angular/core/esm5/core.js
  26. @ ./src/main.ts
  27. @ multi webpack-dev-server/client?http://0.0.0.0:0 ./src/main.ts
  28.  
  29. ERROR Error: Uncaught (in promise): Error: Template parse errors:
  30. Can't bind to 'ngClass' since it isn't a known property of 'input'. (" <input type="text" [(ngModel)]="firstname" #userFirstname="ngModel"
  31. [ERROR ->][ngClass]="{'is-invalid' : userFirstname.errors && userFirstname.touched }"
  32. id="firs"): ng:///AuthAdminModule/AdminRegisterFormComponent.html@19:16
  33. Error: Template parse errors:
  34. Can't bind to 'ngClass' since it isn't a known property of 'input'. (" <input type="text" [(ngModel)]="firstname" #userFirstname="ngModel"
  35. [ERROR ->][ngClass]="{'is-invalid' : userFirstname.errors && userFirstname.touched }"
  36. id="firs"): ng:///AuthAdminModule/AdminRegisterFormComponent.html@19:16
  37. at syntaxError (compiler.js:485)
  38. at TemplateParser.parse (compiler.js:24631)
  39. at JitCompiler._parseTemplate (compiler.js:34442)
  40. at JitCompiler._compileTemplate (compiler.js:34417)
  41. at eval (compiler.js:34318)
  42. at Set.forEach (<anonymous>)
  43. at JitCompiler._compileComponents (compiler.js:34318)
  44. at eval (compiler.js:34188)
  45. at Object.then (compiler.js:474)
  46. at JitCompiler._compileModuleAndComponents (compiler.js:34187)
  47. at syntaxError (compiler.js:485)
  48. at TemplateParser.parse (compiler.js:24631)
  49. at JitCompiler._parseTemplate (compiler.js:34442)
  50. at JitCompiler._compileTemplate (compiler.js:34417)
  51. at eval (compiler.js:34318)
  52. at Set.forEach (<anonymous>)
  53. at JitCompiler._compileComponents (compiler.js:34318)
  54. at eval (compiler.js:34188)
  55. at Object.then (compiler.js:474)
  56. at JitCompiler._compileModuleAndComponents (compiler.js:34187)
  57. at resolvePromise (zone.js:824)
  58. at resolvePromise (zone.js:795)
  59. at eval (zone.js:873)
  60. at ZoneDelegate.invokeTask (zone.js:425)
  61. at Object.onInvokeTask (core.js:4744)
  62. at ZoneDelegate.invokeTask (zone.js:424)
  63. at Zone.runTask (zone.js:192)
  64. at drainMicroTaskQueue (zone.js:602)
  65. at <anonymous>
  66. defaultErrorLogger @ core.js:1427
  67.  
  68. [... snip ...]
  69.  
  70. <div class="container">
  71. <div class="row">
  72. <div class="col"></div>
  73. <div class="col-md-8 ">
  74. <form #userForm="ngForm" (ngSubmit)="onSubmit(userForm)">
  75. <!-- <form (submit)="onSubmit($event)" [formGroup]="form"> -->
  76. <!-- <form (ngSubmit)="onSubmit()" > -->
  77. <div class="row">
  78. <div class="col-xs-12 col-sm-6 col-md-6">
  79.  
  80. <!-- set up first name -->
  81. <div class="form-group">
  82. <div class="input">
  83. <label>First Name</label>
  84. <input type="text" [(ngModel)]="firstname" #userFirstname="ngModel"
  85. [ngClass]="{'is-invalid' : userFirstname.errors && userFirstname.touched }"
  86. id="firstname" class="form-control input-lg" name="firstname" required minlength="2" tabindex="1">
  87. </div>
  88.  
  89. <div class="invalid-feedback">
  90. Please enter your First Name
  91. </div>
  92. </div>
  93. </div>
  94.  
  95. [... snip ...]
  96.  
  97. import { Component, OnInit, ViewEncapsulation } from '@angular/core';
  98. import { HttpErrorResponse } from '@angular/common/http';
  99. import { FormGroup, FormBuilder, Validators, FormControl } from '@angular/forms';
  100. import { ElementRef } from '@angular/core/src/linker/element_ref';
  101. // import { FormsModule } from '@angular/forms';
  102.  
  103. @Component({
  104. selector: 'app-admin-register-form',
  105. templateUrl: './admin-register-form.component.html',
  106. styleUrls: ['./admin-register-form.component.scss'],
  107. encapsulation: ViewEncapsulation.None
  108. })
  109. export class AdminRegisterFormComponent implements OnInit {
  110.  
  111. firstname = '';
  112. lastname = '';
  113. email = '';
  114. username = '';
  115. password = '';
  116. passwordconf = '';
  117.  
  118. constructor() { }
  119.  
  120. ngOnInit() {
  121.  
  122. }
  123.  
  124. ngAfterViewInit() {
  125. document.getElementById('preloader').classList.add('hide');
  126. }
  127.  
  128. onSubmit(form: ElementRef) {
  129. console.log("form was submitted");
  130. console.log(form);
  131. // { "username":"jwoo", "email":"jwoo@kickboxing.com", "password":"123456", "firstname":"jason", "lastname":"wu" }
  132.  
  133. }
  134. }
  135.  
  136. import { NgModule } from '@angular/core';
  137. import { CommonModule } from '@angular/common';
  138. import { AdminLoginComponent } from './admin-login/admin-login.component';
  139. import { AdminRegisterComponent } from './admin-register/admin-register.component';
  140. import { AdminDataComponent } from './admin-data/admin-data.component';
  141. import { RouterModule } from '@angular/router';
  142. import { AdminHeaderComponent } from './admin-header/admin-header.component';
  143. import { AdminFooterComponent } from './admin-footer/admin-footer.component';
  144. import { AuthAdminComponent } from 'app/pages/auth-admin/auth-admin.component';
  145. import { AdminRegisterFormComponent } from './admin-register-form/admin-register-form.component';
  146.  
  147. import { FormsModule } from '@angular/forms';
  148. import { NgClass } from '@angular/common';
  149. import { BrowserModule } from '@angular/platform-browser/src/browser';
  150.  
  151.  
  152.  
  153. export const routes = [
  154. { path:'', redirectTo:'admin-login-main', pathMatch:'full' },
  155. { path: 'admin-login', component: AdminLoginComponent, pathMatch: 'full' },
  156. { path: 'admin-login-main', component: AuthAdminComponent, pathMatch: 'full' },
  157. { path: 'admin-register', component: AdminRegisterComponent, pathMatch: 'full' },
  158. { path: 'admin-data', component: AdminDataComponent, pathMatch: 'full' }
  159. ];
  160.  
  161.  
  162. @NgModule({
  163. imports: [
  164. BrowserModule,
  165. FormsModule,
  166. RouterModule.forChild(routes)
  167. ],
  168. declarations: [AdminLoginComponent, AdminRegisterComponent,
  169. AdminDataComponent, AdminHeaderComponent,
  170. AdminFooterComponent, AdminHeaderComponent, AdminFooterComponent,
  171. AuthAdminComponent, AdminRegisterFormComponent]
  172. })
  173. export class AuthAdminModule { }
Add Comment
Please, Sign In to add comment