www.briebug.com
CEO, BrieBug
Developer for 20 years
Focused on JavaScript based solutions
About Me
www.briebug.com
www.briebug.com
www.briebug.com
www.briebug.com
www.briebug.com
www.briebug.com
www.briebug.com
www.briebug.com
TypeScript
Architecture
CLI
www.briebug.com
www.briebug.com
www.briebug.com
www.briebug.com
www.briebug.com
ng new my-new-project --routing
www.briebug.com
ng generate component customer
www.briebug.com
www.briebug.com
ng lint
www.briebug.com
www.briebug.com
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { CustomerComponent } from './customer.component';
describe('CustomerComponent', () => {
let component: CustomerComponent;
let fixture: ComponentFixture<CustomerComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ CustomerComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(CustomerComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
www.briebug.com
4
March 23, 2017
www.briebug.com
www.briebug.com
www.briebug.com
www.briebug.com
<div *ngIf="isValid;else other_content">
content here ...
</div>
<ng-template #other_content>other content here...</ng-template>
<div *ngIf="isValid;then content else other_content">here is ignored</div>
<ng-template #content>content here...</ng-template>
<ng-template #other_content>other content here...</ng-template>
www.briebug.com
<div *ngIf="userList | async as users; else loading">
<user-profile *ngFor="let user of users; count as count; index as i"
[user]="user">
User {{i}} of {{count}}
</user-profile>
</div>
<ng-template #loading>Loading...</ng-template>
www.briebug.com
www.briebug.com
www.briebug.com
www.briebug.com
www.briebug.com
www.briebug.com
www.briebug.com
www.briebug.com
www.briebug.com
www.briebug.com
www.briebug.com
www.briebug.com
www.briebug.com
Version 5
www.briebug.com
www.briebug.com
www.briebug.com
www.briebug.com
www.briebug.com