Multiple ng-content

You could add dummy attributes header and body as opposed to template references (#header, #body). And transclude using ng-content with select attribute like select=”[header]”. app.comp.html <app-child> <div header >This should be rendered in header selection of ng-content</div> <div body >This should be rendered in body selection of ng-content</div> </app-child> child.comp.html <div class=”header-css-class”> <ng-content select=”[header]”></ng-content> </div> … Read more

Angular – “has no exported member ‘Observable'”

This might be helpful in Angular 6 for more info refer this Document rxjs: Creation methods, types, schedulers and utilities import { Observable, Subject, asapScheduler, pipe, of, from, interval, merge, fromEvent } from ‘rxjs’; rxjs/operators: All pipeable operators: import { map, filter, scan } from ‘rxjs/operators’; rxjs/webSocket: The web socket subject implementation import { webSocket … Read more

Angular-cli from css to scss

For Angular 6 check the Official documentation Note: For @angular/cli versions older than 6.0.0-beta.6 use ng set in place of ng config. For existing projects In an existing angular-cli project that was set up with the default css styles you will need to do a few things: Change the default style extension to scss Manually … Read more

What is the purpose of providedIn with the Injectable decorator when generating Services in Angular 6?

providedIn: ‘root’ is the easiest and most efficient way to provide services since Angular 6: The service will be available application wide as a singleton with no need to add it to a module’s providers array (like Angular <= 5). If the service is only used within a lazy loaded module it will be lazy … Read more

How to set environment via `ng serve` in Angular 6

You need to use the new configuration option (this works for ng build and ng serve as well) ng serve –configuration=local or ng serve -c local If you look at your angular.json file, you’ll see that you have finer control over settings for each configuration (aot, optimizer, environment files,…) “configurations”: { “production”: { “optimization”: true, … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)