injection scope selector of type meta.object-literal not working
See original GitHub issueI was trying to update and see if natewallace/language-vscode-javascript-angular2 extension works with the new typescript grammar by changing template.ng.json to use meta.object-literal
instead of meta.block
injection scope selector. The extension doesn’t work because I think it treats the dash as minus operator. I modified the grammar and the injection rule from meta.object-literal
to meta.objectliteral
and the extension works as expected.
Note this is the typescript code I tried:
import {Component, HostListener, Directive} from 'angular2/core';
@Directive({selector: 'button[counting]'})
class CountClicks {
numberOfClicks = 0;
@HostListener('click', ['$event.target']) onClick(btn) {
console.log("button", btn, "number of clicks:", this.numberOfClicks++);
}
}
@Component({
selector: 'my-app',
template: `<button counting>Increment</button>`,
directives: [CountClicks]
})
export class AppComponent {
constructor() { console.clear(); }
}
With the extension working the line should have colors from the scope of tags
template: `<button counting>Increment</button>`
Issue Analytics
- State:
- Created 7 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
injection scope selector of type meta.object-literal not working
I was trying to update and see if natewallace/language-vscode-javascript-angular2 extension works with the new typescript grammar by ...
Read more >Nestjs - How to get injectable scope type from another service
The question was how to check the injection scope type at runtime. I need the method to throw an error when it attempts...
Read more >Dependency injection in action - Angular
When all dependencies are in place, AppComponent displays the user information. Logged In User. Limit service scope to a component subtreelink. An Angular ......
Read more >Google Visualization API Reference | Charts
To make a read-only copy of a DataTable (optionally filtered to show specific values, rows, or columns), create a DataView. Each column is...
Read more >Using :scope in querySelector() takes ~2x longer than without ...
Running a few tests, I'm seeing using :scope takes ~2x longer. ... (a) the first querySelectorAll: checks whether a given element is span...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Whoops, pushed to my origin instead of this one. Just pushed here too.
Sorry for the confusion. Will make sure we also have the correct tag
@mjbvz … but ecade6c is not in master on this repository
I see the tags on this repo are also not respecting the npm published version anymore for v3.3.2
Can we please do the following in the future when publishing to npm:
npm run prepublish
npm version minor
ornpm version patch
as needed. this will modifypackage.json
, create a commit and a taggit push && git push --tags
npm publish
.Following these simple steps will help that others can easily correlate npm releases with tags and with commits and that the changes are publicly visible.