You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi @buehler ,
I can see that, I am not getting parsed data for class decorator. How can I get this data provided in decorator. I am using it for angular files
e.g.
import { Component } from '@angular/core';
@component({ selector: 'app-root',
template: <h1>{{title}}</h1> <h2>My favorite hero is: {{myHero}}</h2>
})
export class AppComponent {
title = 'Tour of Heroes';
myHero = 'Windstorm';
}
Here , I need selector and template values from decorator. Is there any way / configuration to get this data using parseSource or parseFile ?
The text was updated successfully, but these errors were encountered:
Hi @buehler ,
Thanks a lot for the inputs. Currently, I am doing exactly what you suggested ( string parsing ).
However, in certain scenarios like below,
where I need individual objects like the one highlighted above, string parsing becomes more complex.
Also, I can not covert the parsed string into Javascript object using JSON.parse as it will not find the individual references like DashboardComponent in this case.
Why I can't get the values of variables like routes using typescript parser. I can see, I only get the datatype. Is there any other way to get such information.
Also, do we have something like esprima ( http://esprima.org/ )for typescript code.
Hi @buehler ,
I can see that, I am not getting parsed data for class decorator. How can I get this data provided in decorator. I am using it for angular files
e.g.
import { Component } from '@angular/core';
@component({
selector: 'app-root',
template:
<h1>{{title}}</h1> <h2>My favorite hero is: {{myHero}}</h2>
})
export class AppComponent {
title = 'Tour of Heroes';
myHero = 'Windstorm';
}
Here , I need selector and template values from decorator. Is there any way / configuration to get this data using parseSource or parseFile ?
The text was updated successfully, but these errors were encountered: