Sanjay Hp Sanjay Hp - 1 month ago 12
HTML Question

Angular Material md-button not working

I have created a html page and used angular material for responsiveness but when i try to add a button using md-button it does not work but md-card is working fine.

I have included all the files shown below


Blockquote




<!DOCTYPE html>
<html>
<head>
<title>Image preview App</title>

<link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/angular_material/1.0.0/angular-material.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular-animate.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular-aria.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular-messages.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angular_material/1.0.0/angular-material.min.js"></script>
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
</head>
<body ng-app>
<md-card style="width:50%;height:300px;">
<md-button>button</md-button>
</md-card>
</body>
</html>




Answer

You are not seeing it because it does not get highlighted, apply a style

 <md-card style="width:50%;height:300px;">
        <md-button class="md-raised next-btn">button</md-button>
 </md-card>

DEMO

Comments