• IT consultant @ OCTO Technology
• Passionate about Agile & Software craftsmanship
• The Moroccan AngularJS developer community
* SOME OF THEM
Application
DashBoard
Login
Search
Toolbar
Application
// my-roor-app.component.ts
import {Component} from '@angular/core';
@Component({
selector: 'my-root-app',
templateUrl: './my-root-app.component.html',
})
class Application { /* ... */ }<!-- index.html -->
<my-root-app>Your application is loading...</my-root-app><div> Hello {{ name }} </div><img [src]="imageUrl" /><button (click)="doIt()"></button><input [(ngModel)]="name" /><div [ngStyle]="setStyles()">
<p *ngFor="let player of players">...</p>
</div><p>
The chained mario's birthday is
{{ birthday | date:'fullDate' | uppercase}}
</p>DatePipe, UpperCasePipe, LowerCasePipe, CurrencyPipe, PercentPipe ...
Service is a class that encapsulates some sort of functionality and provides it as a service for the rest of the application.
export class UserService {
private users: User[] = [];
constructor(
private backend: BackendService,
private logger: Logger
) { ... }
getAllUSers() {
return this.users;
}
}import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
@NgModule({
imports: [ BrowserModule ],
providers: [ Logger ],
declarations: [ AppComponent ],
exports: [ AppComponent ],
bootstrap: [ AppComponent ]
})
export class AppModule { }import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
import { AppModule } from './app.module';
platformBrowserDynamic().bootstrapModule(AppModule);sudo rm -rf yourAngularProject