0

whenever i click to open the md-select input an [object Object] (string) is append to the body tag

Clicking md-select input

Body after clicked one time md-select

Brian
  • 23
  • 2
  • 4
  • Welcome to stack overflow. Have a look at this before raising a question http://stackoverflow.com/help/how-to-ask – Aravind Feb 13 '17 at 01:23

1 Answers1

0

It does not matter whatever the version is, make sure you have binded the field of the object.

<md-select placeholder="Select" ng-model="model">
      <md-option ng-repeat="category in categories" value="{{category}}">
        {{category}}
      </md-option>
</md-select>

DEMO

var app = angular.module('app', ["ngMaterial"]);
app.controller('myCtrl', function($scope) {
  $scope.categories = [
    "test1 with 001",
    "test2 with 002"
  ];  
});
<!DOCTYPE html>
<html ng-app="app">
<head>
  <link rel="stylesheet" href="style.css" />
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/angular-material/1.1.3/angular-material.min.css" />
  <script src="http://code.jquery.com/jquery-2.1.4.min.js"></script>
  <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.5/angular.min.js"></script>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/angular-material/1.1.3/angular-material.js"></script>
  <script src="https://code.angularjs.org/1.4.1/angular-animate.js"></script>
  <script src="https://code.angularjs.org/1.4.1/angular-aria.js"></script>
  <script src="script.js"></script>
</head>
<body ng-controller="myCtrl">
  <div layout="row">
    <md-select placeholder="Select" ng-model="model">
      <md-option ng-repeat="category in categories" value="{{category}}">
        {{category}}
      </md-option>
    </md-select>
  </div>
</body>
</html>
Sajeetharan
  • 216,225
  • 63
  • 350
  • 396