0

I'm missing something here in the wiring. When the button is clicked the alert in the method isn't displayed.

  <div id="mapFilter" ng-controller="MapsController">
   <div>
     <h3>{{SelectedCustomer.officeName}}</h3>
     <input type="button" ng-click="getProperties()" value="Get Data" />
   </div>

   <div>
     <p>hotel count: {{allHotels.length}}</p>
     <p>preferred count: {{preferredHotels.length}}</p>
   </div>
 </div>

The expected execution point:

    $scope.getProperties =  function () {
    var msg = 'Unable to load Properties: ';

    alert("getProperties");

Plunkr:

http://plnkr.co/edit/4eF1Wu4tURysTji0b5kO?p=preview

Thanks!

1

1 Answer 1

1

You have to add the ng-app directive to auto-bootstrap your application:

<body ng-app="main">

You will then get some errors in your plunker that you have to fix first (i.e. load ng-resource, ...)

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.