Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

angular.js:14700 TypeError: vm.getcities is not a function #4039


User avatar
0
ramezani583 created

hi, i create Entity for entry cities and write vm.getCities = function () { vm.loading = true; cityService.getCities({ filter: vm.filterText }).then(function (result) { vm.cityGridOptions.data = result.data.items; }).finally(function () { vm.loading = false; }); }; such as role form!

But i have error "angular.js:14700 TypeError: vm.getcities is not a function" in Clint side! please help me!. Error.zip


7 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @ramezani583,

    Your code seems correct. Could it be a caching issue ? Can you delete cache of your browser and try again ?

  • User Avatar
    0
    ramezani583 created

    No, I deleted cache of my browser and try again, but problem was not resolved!

  • User Avatar
    0
    ramezani583 created

    Don't find a solution for my problem?

  • User Avatar
    0
    rvanwoezik created

    Did you add entity city to DbContext?

  • User Avatar
    0
    ramezani583 created

    Yes i add city entity to DbContext. i get data from server(pic attached) but i have client side error(pic attached)

  • User Avatar
    0
    aaron created
    Support Team

    It's vm.getCities(); not vm.getcities();

  • User Avatar
    0
    ramezani583 created

    Yessssssssssssssssssssssssssssssssssssssssssssssssssssssssss. thank you.