Skip to content

Instantly share code, notes, and snippets.

@robinboehm
Last active December 29, 2015 17:19
Show Gist options
  • Save robinboehm/7703696 to your computer and use it in GitHub Desktop.
Save robinboehm/7703696 to your computer and use it in GitHub Desktop.
RevealJS Slides with own scope per section(directive)
<html ng-app>
<!-- ..... --->
<section ng-init="color.r=0;color.g=0;color.b=0;color.a=0.75;">
<h2>Colorpicker</h2>
<div class="result" style="background-color:rgba({{color.r}},{{color.g}},{{color.b}},{{color.a}});"></div>
<div><input type="range" ng-model="color.r" max="255"/>{{color.r}}</div>
<div><input type="range" ng-model="color.g" max="255"/>{{color.g}}</div>
<div><input type="range" ng-model="color.b" max="255"/>{{color.b}}</div>
<div><input type="range" ng-model="color.a" max="1" step="0.01"/>{{color.a}}</div>
</section>
<!-- ..... --->
angular.module("robinBoehmAngularSlides", [])
.directive('section',function(){
return{
restrict: 'E',
scope:true
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment