Reputation: 639
Basically, I have a web server running on localhost, and I want to exchange data between my AngularJS web app and my server. I successfully transfer the data, but displaying it properly is a problem.
I've made a simplified plunkr version of my AngularJS application...
Obviously, you don't have the server side code, but you do not need it. As said in plunkr i have more than one problem:
$route.reload()
, I also tried with $window.location.reload(true)
, $window.location.href = $window.location.href
... nothing worked so farAny advice is more than welcome,
Thank you for your time.
Upvotes: 1
Views: 1892
Reputation: 48211
Regarding the 3 problems you mention:
You can't use $route.reload()
if you are not using ngRoute
and you haven't configured any routes.
(BTW, adding ngRoute
as a dependency, while not including the relevant JS script will raise errors.)
ngModel
doesn't bind data to selectedListItem
This seems to work as expected once you fix the other errors (see demo below).
This seems to work as expected once you fix the other errors (see demo below).
See, also, this short demo.
Upvotes: 1
Reputation: 559
See the AngularJS tutorial on routing and views:
https://docs.angularjs.org/tutorial/step_07
Upvotes: 1