I'm just starting ionic and angularJs, so far it has been good, but i have some problem now. Hope to get some help.
I have 2 views, list of workshops (workshops.html) and a detailed view of the selected workshop (workshop_d.html).
When i click on one of the workshops in the list, the ng-click will send the id to the controller. The controller will then grab the details of the workshop by means of rest api. I have no problem grabbing the details and printing to console, but i could not display the details in workshop_d.html. To simplify this problem, i assigned a static text, workshop_name to a scope variable and try displaying it and i still can't see the value. My simplified code is listed below. Pls tell me what am i missing. Thanks.
File: workshop_d.html
<h1>{{workshop_name}}</h1>
File: ws.js
$scope.workshop_detail_page=function(id){
$http.get(url+"/"+id).then(function(response){
//..do something..
//assign a test value to workshop_name
$scope.workshop_name=“Workshop ABC”;
$state.go('tabs.workshopdetail',{'wID':id});
});
};