[AngularJS] Re: HTML links to routes in Angular app

2018-10-29 Thread Shweta
Hi Sander, I have changed reroute to fit my requirement but not sure why whole page is loading I was trying to take external file attribute and compare with deferred list if attribute is there then load the page within component as it happens in angular. ngOnInit() {

[AngularJS] Re: HTML links to routes in Angular app

2018-10-26 Thread Shweta
Hi Sander, Thanks for the update!! Error has gone and code works as expected. I have one question what does 'ng-reflect-router-link' do in the code. Not able to understand that line. regards Shweta -- You received this message because you are subscribed to the Google Groups "Angular and

[AngularJS] Re: HTML links to routes in Angular app

2018-10-26 Thread Sander Elias
Hi Shweta, Hmm, wrote it a while ago. Typescript got better in the meantime ;) Updated the typings for you: import { AfterViewInit, ContentChildren, Directive, ElementRef, QueryList, ViewChildren } from '@angular/core'; import { Router, RouterLink } from '@angular/router'; @Directive({

[AngularJS] Re: HTML links to routes in Angular app

2018-10-26 Thread Shweta Sinha
Hi Sander, This is perfect and exactly what I am looking for.. I tried using the code and modify it to use but its not working for Angular 6. giving error "property does not exist on type" for has attribute and addEventlistner and class name not for QueryList, I am new to Angular and want

[AngularJS] Re: HTML links to routes in Angular app

2018-10-25 Thread Shweta Sinha
Hi Thomas, This is perfect and exactly what I am looking for.. I tried using the code and modify it to use but its not working for Angular 6. giving error "property does not exist on type" for has attribute and addEventlistner and class name not for QueryList, I am new to Angular and want

[AngularJS] Re: HTML links to routes in Angular app

2017-08-06 Thread Thomas Baine
This is brilliant Sander, thank you. I can't profess to understand exactly how it does what it does, but at my stage with Angular, it's a lot easier to learn from something complete that works compared to stumbling around with only an outcome in mind and no real idea of how to get there.

[AngularJS] Re: HTML links to routes in Angular app

2017-08-04 Thread Sander Elias
Hi Thomas, Here is a directive that takes anchors and rewrites them to use the router. import { Directive, ElementRef, ContentChildren, ViewChildren } from '@angular/core'; import { Router, RouterLink } from '@angular/router' @Directive({ selector: '[rewriteAnchors]' }) export class