I am wondering how to use an object DirectiveResolverto modify a given one Component.
Dependencies (ng2 moves quickly these days, quickly become obsolete)
"@angular/common": "~2.4.3",
"@angular/compiler": "~2.4.3",
"@angular/core": "~2.4.3",
I tried this:
import { Component } from '@wwwalkerrun/nativescript-ngx-magic';
import { OnInit, Directive, Type } from '@angular/core';
import { DirectiveResolver } from '@angular/compiler';
class myViewResolver extends DirectiveResolver {
resolve(type: Type<any>, throwIfNotFound?: boolean): Directive {
var view = super.resolve(type, throwIfNotFound);
console.log(type);
console.log(view);
return view;
}
}
@Component({
selector: 'app-root',
templateUrl: 'views/app/app.component.html',
styleUrls: ['views/app/app.component.css'],
providers: [myViewResolver]
})
export class AppComponent {
title = 'app works!';
}
But I do not receive the logs, so I suspect that the decision has not been implemented.
Any idea?
ps: no entry in official documentation angular.io api ...
Sebas source
share