Skip to content

Commit a9e2e2f

Browse files
committed
Update
1 parent 415f3df commit a9e2e2f

7 files changed

+42
-5
lines changed

webapp-030/src/app/app.component.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<div class="panel panel-default espaco">
33

44

5-
5+
<app-socios [nome_novo] = 'valor'></app-socios>
66

77

88

webapp-030/src/app/app.component.ts

+1-3
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,7 @@ import { Component } from '@angular/core';
1111
export class AppComponent {
1212

1313
//...
14-
lista_nomes: string[] = [
15-
'Daniel', 'Priscila', 'Jojob'
16-
];
14+
valor: string = 'Sapup3';
1715

1816
}
1917

webapp-030/src/app/app.module.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,12 @@ import { BrowserModule } from '@angular/platform-browser';
33

44
import { AppRoutingModule } from './app-routing.module';
55
import { AppComponent } from './app.component';
6+
import { SociosComponent } from './socios/socios.component';
67

78
@NgModule({
89
declarations: [
9-
AppComponent
10+
AppComponent,
11+
SociosComponent
1012
],
1113
imports: [
1214
BrowserModule,

webapp-030/src/app/socios/socios.component.css

Whitespace-only changes.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<p>Nome: {{ nome }}</p>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import { ComponentFixture, TestBed } from '@angular/core/testing';
2+
3+
import { SociosComponent } from './socios.component';
4+
5+
describe('SociosComponent', () => {
6+
let component: SociosComponent;
7+
let fixture: ComponentFixture<SociosComponent>;
8+
9+
beforeEach(async () => {
10+
await TestBed.configureTestingModule({
11+
declarations: [ SociosComponent ]
12+
})
13+
.compileComponents();
14+
});
15+
16+
beforeEach(() => {
17+
fixture = TestBed.createComponent(SociosComponent);
18+
component = fixture.componentInstance;
19+
fixture.detectChanges();
20+
});
21+
22+
it('should create', () => {
23+
expect(component).toBeTruthy();
24+
});
25+
});
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import { Component, Input } from '@angular/core';
2+
3+
@Component({
4+
selector: 'app-socios',
5+
templateUrl: './socios.component.html',
6+
styleUrls: ['./socios.component.css']
7+
})
8+
export class SociosComponent {
9+
10+
@Input('nome_novo') nome: string = 'Daniel Oliveira';
11+
}

0 commit comments

Comments
 (0)