D3
OG
Old school D3 from simpler times
All examples
By author
By category
About
dslanger
Full window
Github gist
MybMMz
<body ng-app="app" ng-controller="MainController as mainCtrl"> <div class="container"> <div class="suits" ng-init="suits=['Spades', 'Clubs', 'Hearts', 'Diamonds']"> <ul> <li ng-repeat="suit in suits">{{ suit }}</li> </ul> </div> <div class="dupes" ng-init="dupes=[1,1,2,5,6,9,9,9]"> <ul> <li ng-repeat="dupe in dupes track by $index">{{ dupe }}</li> </ul> </div> <div class="players" ng-repeat="key in second"> <p>NAME: {{key.name}}, AGE: {{key.age}}</p> </div> <div ng-show='3 + 4 == 5'> 3 + 4 isn't 5, don't show </div> <div ng-show='3 + 4 == 7'> 3 + 4 is 7, do show </div> <div ng-hide='3 + 4 == 5'> 3 + 4 isn't 5, don't hide </div> <div ng-hide='3 + 4 == 7'> 3 + 4 is 7, do hide </div> <h1>Sign Up</h1> <input type="text" ng-model="password"/> <p>Your password is {{ password.length }} characters</p> <button type="submit" class="btn btn-primary" ng-show="password.length > 5">Sign Up!</button> <p class="bg-danger badpw" ng-show="password.length <6">Password is invalid!</p> </div> <div class="container" ng-controller="StoreController as storeCtrl"> <div class="cameraShop row" ng-init="productSort='-rating'"> <div class="col-md-8 col-md-offset-2"> <h1>Camera Shop</h1> <select ng-model="productSort"> <option value="-rating">Rating</option> <option value="-price">Price</option> </select> <div class="product" ng-repeat="product in products | orderBy: productSort"> <h6>{{ product.title }}</h6> <span class="price">Price: {{ product.price | currency }}</span> <span class="sale" ng-show="product.onSale">ON SALE!!</span> <p class="rating">Rating: {{ product.rating }}</p> <img ng-src="{{ product.image }}"/> </div> </div> </div> </div> </body>