Login / Join
Testing Angular Material Design
submitted on 29/04/2015 by
Codicode
+ infos
Config
Embed
Share
Testing Angular Material Design
by
Codicode
Angular material design test single page application, hello world example, angular buttons, input fields, form validation ...
Framework 1 :
-- None --
jQuery 2.0.3
jQuery 1.9.1
jQuery 1.9.0
jQuery 1.8.0
jQuery 1.7.1
jQuery 1.6.3
jQuery UI 1.10.3
MooTools 1.4.5
AngularJS 1.0.4
Prototype 1.7.1.0
Dojo 1.8.3
Chrome Frame 1.0.3
Ext Core 3.1.0
SWFObject 2.2
WebFont Loader 1.1.2
Framework 2 :
-- None --
jQuery 2.0.3
jQuery 1.9.1
jQuery 1.9.0
jQuery 1.8.0
jQuery 1.7.1
jQuery 1.6.3
jQuery UI 1.10.3
MooTools 1.4.5
AngularJS 1.0.4
Prototype 1.7.1.0
Dojo 1.8.3
Chrome Frame 1.0.3
Ext Core 3.1.0
SWFObject 2.2
WebFont Loader 1.1.2
+ Js file(s) :
//ajax.googleapis.com/ajax/libs/angularjs/1.3.8/angular.min.js //ajax.googleapis.com/ajax/libs/angularjs/1.3.8/angular-animate.min.js //ajax.googleapis.com/ajax/libs/angularjs/1.3.8/angular-aria.min.js //ajax.googleapis.com/ajax/libs/angularjs/1.3.8/angular-messages.min.js //cdnjs.cloudflare.com/ajax/libs/angular-material/0.9.0/angular-material.min.js
+ Css file(s) :
//cdnjs.cloudflare.com/ajax/libs/angular-material/0.9.0/angular-material.min.css
Apply
Link :
Direct http link :
Fork button :
Html code :
Embed preview :
Copy the following html code to your page to embed the preview,
To include many previews on a single page, just repeat the first line.
You can change the width, height and border color (bcolor).
<div class="refork-widget" code="83b" style="width:100%;height:200px;" bcolor="#ccc"></div>
<script type="text/javascript" src="//snippet.run/d/z.js"></script>
HTML
<div layout="column" ng-app="StarterApp" ng-controller="AppCtrl" style="height:100%;"> <md-toolbar layout="row"> <button ng-click="toggleSidenav('left')" hide-gt-sm class="menuBtn"> <span class="visually-hidden">Menu</span> </button> <h1 class="md-toolbar-tools" layout-align-gt-sm="center">Angular Material Design Test Page</h1> </md-toolbar> <div layout="row" flex> <md-sidenav layout="column" class="md-sidenav-left md-whiteframe-z2" md-component-id="left" md-is-locked-open="$mdMedia('gt-sm')"> <md-button>Flat Button</md-button> <md-button class="md-raised"> Raised Button </md-button> <md-button ng-disabled="true"> Disabled Button </md-button> </md-sidenav> <div flex id="content"> <md-content layout="column" flex class="md-padding"> <form name="thisForm"> <md-input-container> <label>Name</label> <input name="userName" md-maxlength="15" ng-model="userName" type="text" required /> <div ng-messages="thisForm.userName.$error"> <div ng-message="required">This filed is required.</div> <div ng-message="md-maxlength">This filed is too long.</div> </div> </md-input-container> <div> Typed name : {{ userName }} </div> <div> <md-button class="md-raised md-primary" ng-disabled="thisForm.$invalid">Valider</md-button> </div> </form> </md-content> </div> </div> </div>
CSS
.menuBtn { background-color: transparent; border: none; height: 38px; margin: 16px 0 0 16px; width: 36px; } md-toolbar h1 { font-weight: normal; } md-list .md-button { color: inherit; font-weight: 500; text-align: left; width: 100%; } /* Using Data-URI converted from svg until <md-icon> becomes available https://github.com/google/material-design-icons */ .menuBtn { background-color:red; }
Javascript
var app = angular.module('StarterApp', ['ngMessages', 'ngAria', 'ngMaterial']); app.controller('AppCtrl', ['$scope', '$mdSidenav', function($scope, $mdSidenav){ $scope.toggleSidenav = function(menuId) { $mdSidenav(menuId).toggle(); }; //$scope.userName = 'Default user'; }]);
©2013 Copyright snippet.run
Privacy
-
Terms of use
-
About
-
Contact