javascript - Angular materials - how start? -


i have angular materials test code:

<div class="radiobuttondemobasicusage" ng-app="myapp">   <form ng-submit="submit()" ng-controller="appctrl">     <p>selected value: <span class="radiovalue">{{ data.group1 }}</span> </p>      <md-radio-group ng-model="data.group1">        <md-radio-button value="apple" class="md-primary">apple</md-radio-button>       <md-radio-button value="banana"> banana </md-radio-button>       <md-radio-button value="mango">mango</md-radio-button>      </md-radio-group>      <hr>      <p>selected value: <span class="radiovalue">{{ data.group2 }}</span></p>      <md-radio-group ng-model="data.group2" class="md-primary">          <md-radio-button ng-repeat="d in radiodata" ng-value="d.value" ng-disabled=" d.isdisabled " ng-class="{'md-align-top-left': $index==1}">             {{ d.label }}<br>           <span class="ipsum" ng-if="$index == 1">             duis placerat lectus et justo mollis, nec sodales orci congue. vestibulum semper non urna ac suscipit.             vestibulum tempor, ligula id laoreet hendrerit, massa augue iaculis magna,             sit amet dapibus tortor ligula non nibh.           </span>          </md-radio-button>      </md-radio-group>      <p>       <md-button class="md-raised" ng-click="additem()" type="button">add</md-button>       <md-button class="md-raised" ng-click="removeitem()" type="button">remove</md-button>     </p>      <hr>      <p style="margin-bottom: 0;">graphic radio buttons need labeled <code>aria-label</code> attribute.</p>     <p style="margin-top: 0;">selected avatar: <span class="radiovalue">{{ data.group3 }}</span></p>      <md-radio-group ng-model="data.group3">       <md-radio-button ng-repeat="it in avatardata" ng-value="it.value" aria-label="{{it.title}}">           <md-icon md-svg-icon="{{it.id}}"></md-icon>       </md-radio-button>     </md-radio-group>   </form> </div> 

https://material.angularjs.org/0.11.1/#/demo/material.components.radiobutton

it's working fine codepen, errors when try open locally.

i tried install angular or put links js/css cdn not work :(

sb can me?

you forgot add html/body tags , scripts. try add localy, should work.

http://codepen.io/anon/pen/ppwkwy

html

 <html lang="en" ng-app="starterapp">       <head>         <link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/angular_material/0.9.4/angular-material.min.css">         <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=robotodraft:300,400,500,700,400italic">         <meta name="viewport" content="initial-scale=1" />       </head>       <body layout="column" ng-controller="appctrl">     <!-- content -->          <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.15/angular.min.js"></script>         <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.15/angular-animate.min.js"></script>         <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.15/angular-aria.min.js"></script>          <script src="https://ajax.googleapis.com/ajax/libs/angular_material/0.9.4/angular-material.min.js"></script>       </body>     </html> 

js

var app = angular.module('starterapp', ['ngmaterial']);  app.controller('appctrl', ['$scope', '$mdsidenav', function($scope, $mdsidenav){   $scope.togglesidenav = function(menuid) {     $mdsidenav(menuid).toggle();   };  }]); 

edit: if problem, , want learn angularjs, try finding course on https://www.udemy.com/ give away great courses free.


Comments

  1. Looking to learn video editing course online? Discover the best ui ux design course with placement to equip yourself with the right skill set to be able to make great videos and motion graphics. Best online graphic design courses with Adobe Premiere Pro at subhe is the perfect tool to teach you the skills you need to become a professional video editor. Start your career by taking the best online editing courses in India and Keep Growing With Unlimited Creative Classes.

    ReplyDelete

Post a Comment

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -