I'm facing a challenge in my IDE while working on a simple code. I'm currently using Angular 1.4 and ES 5.1.
function myFunction() {
var vm = this;
vm.listResults = null;
SomeService.someFunction()
.then(function (result) {
vm.listResults = result;
if (vm.listResults.length > 0) {
vm.selectCity(vm.listResults[0]);
}
});
}
vm.selectCity = function (city) {};
The final if statement is causing a warning and indicates that the vm.listResults
variable remains unresolved. The same issue arises with the call to selectCity
and its parameter. I can't navigate to them by CTRL+CLICKing and it's unclear why.
What steps should I take to establish proper linking here?
Under
Languages & Frameworks > Javascript > Libraries
, I have selected angular-DefinitelyTyped
, HTML
, and Node.js
Core, and nothing more.
While I could disable the warnings, I prefer not to. Understanding is key for me.
Thank you for your assistance :)