Angular Project Setup STEPS
Angular Project Setup STEPS
3. Install the latest version of Angular CLI. To install or update Angular CLI,
type this command in the Terminal or Node Command-Line.
npm install -g @angular/cli
4. Check angular version {Note if ng may not work in windows powershell, run it in
command prompt console}
ng --version
8. Service Classes
ng g s employee
Here ng refers Angular
g meaning generate
s meaning service
If bootstrap won't work then try to import bootstrap CSS in style.css like:
@import '~bootstrap/dist/css/bootstrap.min.css';
.footer {
position: absolute;
bottom: 0;
width:100%;
height: 70px;
background-color: blue;
text-align: center;
color: white;
}
@Injectable({
providedIn: 'root'
})
export class EmployeeService {
getEmployeesList(): Observable<Employee[]>{
return this.httpClient.get<Employee[]>(`${this.baseURL}`);
}
createEmployee(employee: Employee): Observable<Object>{
return this.httpClient.post(`${this.baseURL}`, employee);
}