angular s easy examples
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-example',
templateUrl: './example.component.html',
styleUrls: ['./example.component.css']
})
export class ExampleComponent implements OnInit {
constructor() { }
ngOnInit() { }
}<!-- ./components/example/example.component.html -->
<h1>{{ username }}</h1>
<span>Change Name: </span><input [(ngModel)]="username">
<h3>Posts: {{ totalPosts }}</h3>
<ul>
<hr/>
<div *ngFor="let post of allPosts; let i=index">
<button (click)="deletePost(i)">DELETE</button>
<h6>{{ post.title }}</h6>
<p>{{ post.body }}</p>
<hr/>
</div>
</ul><!-- app.component.html -->
<ul>
<li routerLink="/A">Go to A!</li>
<li routerLink="/B">Go to B!</li>
</ul>
<router-outlet></router-outlet>
Also in JavaScript:
- nodejs connection to localhost refused mysql errno -61
- javascript array add end
- how to loop through all tags in html
- react toastify does not have design
- js click anchor
- javascript class static method
- get syntethicbaseevent and parameter in react
- javascript add minutes to date
- find method javascript
- route react
- clear scene\
- AJAX in reload a div container
- random number in js
- not selector jquery
- angular two datepickers
- create 5 car object using a constructor function in javascript
- how to prevent previous radio button active react native
- how to save data on database in react form
- javascript developer salary
- text align-center js
- javascript convert int to float with 2 decimal places
- html include js file flask
- material ui grid react
- javascript array filter