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 far Any advice is more than welcome,
Thank you for your time.
See the AngularJS tutorial on routing and views:
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 .
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.