Advertisement
Guest User

Untitled

a guest
Jun 17th, 2019
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.76 KB | None | 0 0
  1. import { BrowserModule } from '@angular/platform-browser'
  2. import { NgModule } from '@angular/core'
  3. import { AppRoutingModule } from './app-routing.module'
  4. import { AppComponent } from './app.component'
  5. import { TopoComponent } from './topo/topo.component'
  6. import { TableHeadComponent } from './table-head/table-head.component'
  7. import { PainelComponent } from './painel/painel.component'
  8. import {RouterModule} from '@Angular/router'
  9. import {ROUTES} from './app-routes';
  10. import { HomeComponent } from './home/home.component';
  11. import { LoginComponent } from './login/login.component';
  12. import { PlanilhawebComponent } from './planilhaweb/planilhaweb.component';
  13. import { DetalhesPlanilhaComponent } from './detalhes-planilha/detalhes-planilha.component';
  14. import { CadastroComponent } from './cadastro/cadastro.component'
  15. import { ReactiveFormsModule } from '@angular/forms';
  16. import { MDBBootstrapModule } from '../../node_modules/angular-bootstrap-md';
  17.  
  18.  
  19. @NgModule({
  20. declarations: [
  21. AppComponent,
  22. TopoComponent,
  23. TableHeadComponent,
  24. PainelComponent,
  25. HomeComponent,
  26. LoginComponent,
  27. PlanilhawebComponent,
  28. DetalhesPlanilhaComponent,
  29. CadastroComponent
  30. ],
  31. imports: [
  32. BrowserModule,
  33. ReactiveFormsModule,
  34. RouterModule.forRoot(ROUTES)
  35. ],
  36. providers: [],
  37. bootstrap: [AppComponent]
  38. })
  39.  
  40. export class AppModule {}
  41.  
  42. import {Routes} from '@angular/router'
  43. import {PainelComponent} from './painel/painel.component'
  44. import { TableHeadComponent } from './table-head/table-head.component';
  45. import{ HomeComponent} from './home/home.component'
  46. import{LoginComponent} from './login/login.component'
  47. import {PlanilhawebComponent} from './planilhaweb/planilhaweb.component'
  48. import { DetalhesPlanilhaComponent } from './detalhes-planilha/detalhes-planilha.component';
  49. import { CadastroComponent } from './cadastro/cadastro.component';
  50.  
  51. export const ROUTES: Routes = [
  52. { path: '', component: HomeComponent},
  53. { path: 'login', component: LoginComponent},
  54. { path: 'producao', component: TableHeadComponent},
  55. { path: 'plan', component: PlanilhawebComponent},
  56. { path: 'detalhes', component: HomeComponent},
  57. { path: 'cadastro', component: CadastroComponent},
  58. { path: 'detalhes/:id', component: DetalhesPlanilhaComponent}
  59. ]
  60.  
  61. import { Component, OnInit, Input } from '@angular/core';
  62. import { FormGroup, FormControl } from '@angular/forms';
  63. import{PlanilhawebComponent} from '../planilhaweb/planilhaweb.component'
  64. import {ActivatedRoute, Routes } from '@angular/router'
  65. import {ROUTES} from'../app-routes'
  66.  
  67. @Component({
  68. selector: 'app-detalhes-planilha',
  69. templateUrl: './detalhes-planilha.component.html',
  70. styleUrls: ['./detalhes-planilha.component.css']
  71. })
  72. export class DetalhesPlanilhaComponent implements OnInit {
  73. private route: ActivatedRoute
  74. constructor(route: ActivatedRoute ) {
  75. this.route =route
  76. }
  77.  
  78. cadastroForm = new FormGroup({
  79. ID : new FormControl(''),
  80. CLIENTE : new FormControl(''),
  81. CODIGODMD : new FormControl(''),
  82. SIGLARM : new FormControl(''),
  83. SIGLAPORTAL : new FormControl(''),
  84. COMERCIAL : new FormControl(''),
  85. ATENDIMENTO : new FormControl(''),
  86. AUDITORIA : new FormControl(''),
  87. PERIODICIDADE : new FormControl(''),
  88. ENTREGA : new FormControl(''),
  89. RESPONSAVEL : new FormControl(''),
  90. LAYOUT : new FormControl(''),
  91. DM : new FormControl(''),
  92. ODSDM : new FormControl(''),
  93. EFV : new FormControl(''),
  94. CAMINHO : new FormControl(''),
  95. ORIGEM : new FormControl(''),
  96. PORTAL : new FormControl(''),
  97. FTP : new FormControl(''),
  98. OBSERVACAO : new FormControl(''),
  99. MAILING : new FormControl('')
  100. });
  101.  
  102. ngOnInit() {
  103.  
  104. console.log(this.route.snapshot.queryParamMap);
  105. }
  106.  
  107. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement