Skip to content

Instantly share code, notes, and snippets.

@sethlynne
Last active August 29, 2015 14:04
Show Gist options
  • Save sethlynne/885f4dea972731005ff3 to your computer and use it in GitHub Desktop.
Save sethlynne/885f4dea972731005ff3 to your computer and use it in GitHub Desktop.
angular.module "test", ["ui.bootstrap"]
CarouselDemoCtrl = ($scope) ->
$scope.myInterval = 5000
slides = $scope.slides = []
$scope.addSlide = ->
newWidth = 600 + slides.length
slides.push
image: "http://placekitten.com/" + newWidth + "/300"
text: [
"More"
"Extra"
"Lots of"
"Surplus"
][slides.length % 4] + " " + [
"Cats"
"Kittys"
"Felines"
"Cutes"
][slides.length % 4]
doctype html
html(xmlns:svg="http://www.w3.org/2000/svg")
head
title Test
meta(name="description" content="Test")
meta(content="width=device-width, initial-scale=1.0, user-scalable=0, minimum-scale=1.0, maximum-scale=1.0" name="viewport")
= stylesheet_link_tag 'application', media: 'all'
= javascript_include_tag 'application'
= csrf_meta_tags
body(ng-app="test")
= yield
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment