Skip to content

Instantly share code, notes, and snippets.

@jlbruno
Created June 28, 2013 14:45
Show Gist options
  • Save jlbruno/5885214 to your computer and use it in GitHub Desktop.
Save jlbruno/5885214 to your computer and use it in GitHub Desktop.
basic angular.js setup, which should work when code is minified.
<!doctype html>
<html class="no-js" lang="en" ng-app="AppName">
<head>
<meta charset="utf-8">
<title>Index</title>
<script type="text/javascript" charset="utf-8" src="js/angular.min.js"></script>
<script type="text/javascript" charset="utf-8" src="js/angular-mobile.min.js"></script>
<script type="text/javascript" charset="utf-8" src="js/app.js"></script>
</head>
<body>
<div id="envelope" class="cfs" ng-controller="ControllerName">
<div ng-swipe-right="doSomething1()" ng-swipe-left="doSomething2()">
<img ng-src="img/screens/{{images[imgIndex]}}" ng-click="doSomething1()">
</div>​
</div>
</body>
</html>
angular.module('AppName', ['ngMobile']).controller('ControllerName', ['$scope', function($scope) {
$scope.arrayOrObjectOfData = [
'01_lock.gif',
];
$scope.someVar = 0;
$scope.doSomething1 = function() {
};
$scope.doSomething2 = function() {
};
}]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment