javascript - $scope variable doesnt integrate with express api -


the static part of app seems load ok. added service uses express simple api, when try set #scope module's controller seems if hasn't loaded. puzzled why happening because claims find , load correctly based on server output... appreciated :)

here project: https://github.com/abott1222/simple-mean-app

get / 304 4.637 ms - -

get /js/angular.min.js 304 1.523 ms - -

get /js/angular-route.min.js 304 1.627 ms - -

get /style.css 304 0.376 ms - -

get /app/app.js 304 0.391 ms - -

get /app/controllers/todolistcontroller.js 304 0.730 ms - -

get /app/controllers/todocontroller.js 304 0.717 ms - -

get /app/services/todoprovider.js 304 0.666 ms - -

get /app/partials/todo_list.html 304 0.269 ms - -

i forgot work node need make api calls async. change in static/app/controllers/*

$scope.todolist = todoprovider.getalltodos();

to

$scope.todolist = todoprovider.getalltodos(function (err, todos) {     $scope.finished_loading = true;     if (err) {         $scope.page_load_error = err.message;         } else {             $scope.todolist = todos;         }                     }); 

hope might somebody... sorry question may have been vague :)


Comments

Popular posts from this blog

java - SSE Emitter : Manage timeouts and complete() -

jquery - uncaught exception: DataTables Editor - remote hosting of code not allowed -

java - How to resolve error - package com.squareup.okhttp3 doesn't exist? -