Angular4 – Scrolling to anchor

For Angular 6+ you can use: In your routing module: imports: [RouterModule.forRoot(routes, { anchorScrolling: ‘enabled’})] Then in your component html <a (click)=”onClick(‘AnchorId’)”>Click me!</a> <a (click)=”onClick(‘OtherAnchorId’)”>Click me, too!</a> … <div id=”AnchorId”>…</div> … <div id=”OtherAnchorId”>…</div> Then in your component ts import { ViewportScroller } from ‘@angular/common’; @Component({ selector: ‘component-selector’, templateUrl: ‘./mycomponent.component.html’ }) export class MyComponent { constructor(private … Read more

AngularJS – $anchorScroll smooth/duration

Unfortunately this is not possible using $anchorScroll. As you discovered $anchorScroll doesn’t have any options and doesn’t work with $ngAnimate. In order to animate the scroll you would need to use your own service/factory or just straight javascript. For the sake of self-learning I put together an example with a smooth scrolling service. There are … Read more

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