Hi, I'm brand new to the group, and brand new to angular js...I've been 
tasked with coding something kind of outside my wheelhouse and I'm hoping 
someone out there might be able to throw me a rope. To start, I'm trying to 
create a simple html page that uses a single, simple angularjs controller 
to issue a REST call to a running application. Currently when I run it, the 
page loads, and it displays the header and the button, but when I click on 
it nothing happens.  The variable of 'data' ends up getting printed out 
literally as '{{ data }}', though I suspect this may be because the 
controlled function is never getting called - I can see from inside the 
REST interface that it is never receiving any request, so I think I've got 
something fundamentally wrong here. Can anyone steer me in the right 
direction? Thanks!

Here is the html page:

*<div ng-cloak>*
*  <h1>Keyword Libraries</h1>*
*  <md-tabs md-dynamic-height md-border-bottom>*
*    <md-tab label="Keyword Documentation">*
*      <md-content class="md-padding">*
*        <div ng-controller="getKwDocs" ng-init="loadKwData()">*
*          <button id="Get Keywords" ng-click="loadKwData()">Get 
Keywords</button>*
*          <div ng-repeat="data in kwData">*
*            <h3> {{ data }} </h3>*
*          </div>*
*        </div>*
*      </md-content>*
*    </md-tab>*
*  </md-tabs>*
*</div>*

And the controller looks like this:

*angular.controller('getKwDocs', function($scope, $http) {*

* // load the keywords*
* $scope.loadKwData = function() {*
* $http.get('/trm/kw_test').success(*
* function(data) {*
* $scope.kwData = data;*
* });*
* };*
*});*

-- 
You received this message because you are subscribed to the Google Groups 
"Angular and AngularJS discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to