Base solution for your next web application
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

Markdown is supported
Copy & paste or drag & drop images (max 30 MB per image)

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 ?

    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)
  • User Avatar
    0
    ramezani583 created

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

    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)
  • User Avatar
    0
    ramezani583 created

    Don't find a solution for my problem?

    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)
  • User Avatar
    0
    rvanwoezik created

    Did you add entity city to DbContext?

    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)
  • 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)

    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)
  • User Avatar
    0
    aaron created
    Support Team

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

    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)
  • User Avatar
    0
    ramezani583 created

    Yessssssssssssssssssssssssssssssssssssssssssssssssssssssssss. thank you.

    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)