Ma
Posts: 0
Joined: Sat Jun 06, 2015 4:17 pm

Popular beginner problems: reload ng-view and close modal with ng-click event?

How can I reload ng-view with ng-click event?
How can I close a modal with ng-click event?

I'm working with an ionic/angular project.

Ma
Posts: 0
Joined: Sat Jun 06, 2015 4:17 pm

Popular beginner problems: reload ng-view and close modal with ng-click event?

I tried to do that but that reload all the page ;(

Illya Stepanov
Posts: 0
Joined: Mon Mar 18, 2013 8:48 am

Popular beginner problems: reload ng-view and close modal with ng-click event?

Could you please elaborate, what result you want to have?

Ma
Posts: 0
Joined: Sat Jun 06, 2015 4:17 pm

Popular beginner problems: reload ng-view and close modal with ng-click event?

I have some data from a database in ng-view so I created a button to reload this data if it has a new record. I added a function with location.refresh on ng-click to reload data but It's reload all the page.
May you can fix it?

Illya Stepanov
Posts: 0
Joined: Mon Mar 18, 2013 8:48 am

Popular beginner problems: reload ng-view and close modal with ng-click event?

Please use jQuery Mobile app template or explore AngularJS documentation deeply.

Basically in your case you need to call service that receives data once more and this service will renew data on screen.

If you're outputting data using standard directive ng-repeat from the storage, then you need just to update the data in the variable Scope.
And if you are not using standard services to receive data, then you'll need to call $scope.$apply().

Return to “Issues”