Talks & Videos

Nowadays, it seems that going to a tech conf is the only way to prove that you are a developer (?)
You can learn something from anything anyway, here are some videos I watched recently.

Angular

Introduction to Angular 8 – Alain Chautard
Handling Angular Forms Without Losing Your Sanity – Jennifer Wadella
These ARE the Angular Tips You’re Looking For | John Papa
Angular For Enterprise | Stephen Fluin
“N Things You Didn’t Know About the Router” | Deborah Kurata
The magic of template reference variables – Alain Chautard
How to Dynamically Insert & Remove Form Controls in Angular

JS

dotJS 2018 – John Papa – Choosing Your JavaScript Framework
Ready for Readable Code? – John Papa
The Future of Machine Learning & Javascript | Asim Hussain

Others

Keynote NDC Sydney 2016: If I knew then what I know now – Scott Hanselman

#angular #videos #talks

Angular – Scroll to a…

Angular – Scroll to a div in child component

Child Component

<div  #scrollToPoint>
div to scroll
 </div>

Return scroll point to parent

 @ViewChild('scrollToPoint', { static: false }) scrollToPoint: ElementRef;
  constructor() { }
  ngOnInit() {
  }
  getScrollPoint() {
    return this.scrollToPoint;
  }

Parent Component

  @ViewChild(ChildComponent, { static: false }) childComponent: ChildComponent;
 scroll() {
    this.ChildComponent.getScrollPoint().nativeElement.scrollIntoView();
  }

This would work fine. If you have another button in a child and want to listen to that to scroll, you can add an event emitter:

Parent HTML

<app-child-hero (startHereClick)="scroll()"></app-child-hero> >

Child HTML

<button type="button" class="btn btn-danger" (click)="startHere()">Start Here</button>

Child Class

 @Output() startHereClick: EventEmitter<boolean> = new EventEmitter();
 startHere() {
    this.startHereClick.emit(true);
  }

#angular

#scrolltopoint

Compiling vs Transpiling

A question that I heard recently: Compiling vs Transpiling 

It seems that Wikipedia has enough information as well: “A source-to-source compiler, transcompiler or transpiler is a type of compiler that takes the source code of a program written in one programming language as its input and produces the equivalent source code in another programming language. A source-to-source compiler translates between programming languages that operate at approximately the same level of abstraction, while a traditional compiler translates from a higher level programming language to a lower level programming language.”

Here is the part that NativeScript has in its tooling section: https://docs.nativescript.org/tooling/transpilers

Well, considering how Typescript plays an important role nowadays, transpiling will be a term that we hear a lot.

#typescript #angular #nativescript