-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathapp.js
52 lines (47 loc) · 1.59 KB
/
app.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
angular.module('JuliusAkula',['ui.bootstrap', 'ui.router', 'ngClipboard', 'yaru22.md']).config(['ngClipProvider', '$stateProvider', '$urlRouterProvider', function(ngClipProvider, $stateProvider, $urlRouterProvider){
$urlRouterProvider.otherwise("/");
$stateProvider.state('index', {
url: "/",
templateUrl: 'src/views/homepage.tpl.html',
controller: function($scope){
$scope.btns = "btn btn-";
$scope.types = [
{
type: 'default',
message: 'Default Dialog'
},
{
type: 'danger',
message: 'Danger Dialog'
},
{
type: 'primary',
message: 'Primary Dialog'
},
{
type: 'success',
message: 'Success Dialog'
},
{
type: 'warning',
message: 'Warning Dialog'
},
{
type: 'info',
message: 'Info Dialog'
}];
}
});
ngClipProvider.setPath("node_modules/zeroclipboard/dist/ZeroClipboard.swf");
}]).controller('textInputController', function($scope, $http){
$http({method: "GET", url: "README.md"}).success(function(data, status, headers, config) {
$scope.text = data;
});
$scope.fallback = function(copy) {
window.prompt('Press cmd+c to copy the text below.', copy);
};
$scope.clearText = function(text){
if($scope.text == text) $scope.text = '';
};
$scope.pasteArea = '';
});