New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
autocomplete doesnot work for variable with underscore(_) inside interface #258
Comments
I got same issue. |
I accidentally posted the same issue here: microsoft/vscode#56077 |
Could it be related to this line:
|
No updates on this? |
I have the exact same issue. On the template, the properties with underscore don't get suggested. |
I have same issue. I tried to investigate. Problem is probably caused by using deprecated field The commit 63db792 introduced using I tried to find workaround, but in fact I don't know what exactly was use case for that commit. Only comment there is "improve text insertion for attributes". It tries somehow improve insertion of suggestions with special characters, and if it detects special char, it will use deprecated If someone could clarify the meaning on this commit, I could prepare PR. But right now possible solution could also be to remove this commit. |
Well, I guess the intent was to provide some sanity checking to the auto completion logic. As I wrote above #258 (comment) , I tinkered with that expression a bit but really couldn't make it work at all. Rolling back the entire commit sounds harsh, but if that fixes it (or puts it back in a state that works for us) why not?! Let me know if there is anything I can help with re: Pull Request - QA / test etc. |
Addendum: I found a workaround to make it work. First if the disclaimer: THIS IS THE UGLIEST HACK POSSIBLE, now on the bright side, it brings back all attributes, including ones with underscores and dashes. It's really all about commenting out this line:
The
PS: Thanks @minomikula for making take another stab at it. |
Same issue here |
Based on that file, it might also be correct that the actual fix is removing
|
It seems like the logical place to make the change, but for whatever reason this did not fix it for me, I tried. |
Same issue here |
1 similar comment
Same issue here |
Same issue here! Any workaround to resolve this? |
Same |
@ayazhafiz fixed this in angular/angular#33091 For reference, this is how the word boundary was determined before: vscode-ng-language-service/server/src/server.ts Lines 90 to 107 in a9f4440
Starting from v0.900.0, the replacement span is determined by looking at the proper AST. |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
I am using Visual Studio Code for Angular 5 project I have converted my post JSON data into typeScript file like
//interface class of post data
export interface Client {
ctm_id: number;
firstname: string;
middlename: string;
}
//interface class of post data
export interface ClientContact {
phone: number;
alternate_phone: number;
}
//interface class of post data
export interface ClientPostData {
client: Client;
clientContacts: ClientContact;
clientMedical_info:Clientmedicalinfo;
}
// and declared in component class like
export class FormComponent implements OnInit {
public model: ClientPostData = {};
public ffirst_name:string;
}
I have installed Angular language service to get suggestions for variables from the interface.
When I type f it suggests firstname in html.but it doesn't suggest clientMedical_info when I type model.(dot).It suggests model.clients and model.clientContacts
How can I get suggestion of client_contact when I type model.(dot)
The text was updated successfully, but these errors were encountered: