resharper-angularjs icon indicating copy to clipboard operation
resharper-angularjs copied to clipboard

file location autocomplete for ng-include

Open kkozmic opened this issue 11 years ago • 5 comments

http://docs.angularjs.org/api/ng.directive:ngInclude

Would be really nice if intellisense similar to when specifying value for src tag in HTML be provided.

Also make sure to wrap the constant in quotes (so it's a string).

kkozmic avatar Jan 11 '14 01:01 kkozmic

This should be fairly straightforward for the ng-include attribute and the ng-include[@src] element attribute, but would be a lot trickier for the ng-include: {string}; syntax of the class attribute.

citizenmatt avatar Jan 20 '14 11:01 citizenmatt

What would you expect the behaviour to be when the value isn't quoted? Currently, it works either quoted or unquoted, but obviously the value needs to be quoted. Should it still work (i.e. clickable path segments), but also have a warning squiggly that it's not quoted, or should it just mark the whole string as an error?

I wonder if I can summon the might @johnlindquist for an opinion?

citizenmatt avatar Jan 21 '14 16:01 citizenmatt

I would just require it to be quoted.

The docs show quotes: http://docs.angularjs.org/api/ng.directive:ngInclude

On Tue, Jan 21, 2014 at 9:08 AM, Matt Ellis [email protected]:

What would you expect the behaviour to be when the value isn't quoted? Currently, it works either quoted or unquoted, but obviously the value needs to be quoted. Should it still work (i.e. clickable path segments), but also have a warning squiggly that it's not quoted, or should it just mark the whole string as an error?

I wonder if I can summon the might @johnlindquisthttps://github.com/johnlindquistfor an opinion?

— Reply to this email directly or view it on GitHubhttps://github.com/JetBrains/resharper-angularjs/issues/17#issuecomment-32899588 .

johnlindquist avatar Jan 21 '14 16:01 johnlindquist

So mark the whole string as an error if it's not quoted?

citizenmatt avatar Jan 21 '14 16:01 citizenmatt

Oh, I see what you mean now.

It can be var referencing a string assigned on the $scope, so that wouldn't require quotes. If it's a plain string, then require quotes.

On Tue, Jan 21, 2014 at 9:13 AM, Matt Ellis [email protected]:

So mark the whole string as an error if it's not quoted?

— Reply to this email directly or view it on GitHubhttps://github.com/JetBrains/resharper-angularjs/issues/17#issuecomment-32900155 .

johnlindquist avatar Jan 21 '14 16:01 johnlindquist