This repository was archived by the owner on Jan 17, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 175
/
Copy pathindex.html
103 lines (86 loc) · 4.4 KB
/
index.html
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
<!DOCTYPE html>
<html lang="en" data-ng-app="myApp">
<head>
<meta charset="utf-8">
<title>Angular Intro.js</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="Angular Intro.js - Angular wrapper for intro.js">
<!-- styles -->
<link href="assets/css/bootstrap.min.css" rel="stylesheet">
<link href="assets/css/demo.css" rel="stylesheet">
<link href="assets/css/bootstrap-responsive.min.css" rel="stylesheet">
<!-- Add IntroJs styles -->
<link href="../bower_components/intro.js/introjs.css" rel="stylesheet">
</head>
<body>
<div class="container-narrow" ng-controller="MyController">
<div ng-intro-options="IntroOptions" ng-intro-method="CallMe"
ng-intro-oncomplete="CompletedEvent" ng-intro-onexit="ExitEvent"
ng-intro-onchange="ChangeEvent" ng-intro-onbeforechange="BeforeChangeEvent"
ng-intro-onafterchange="AfterChangeEvent"
ng-intro-autostart="ShouldAutoStart">
<div class="masthead">
<ul id="step5" class="nav nav-pills pull-right">
<li><a href="https://github.com/mendhak/angular-intro.js/tree/master/build"><i class='icon-black icon-download-alt'></i> Download</a></li>
<li><a href="https://github.com/mendhak/angular-intro.js">Github</a></li>
</ul>
<h3 class="muted">ng-intro</h3>
</div>
<div class="jumbotron">
<h1 id="step1">Angular Intro.js</h1>
<p id="step4" class="lead">AngularJS directives for <a href="http://usablica.github.io/intro.js/" onclick="window.open(this.href);return false;">intro.js</a></p>
<a class="btn btn-large btn-success" ng-click="CallMe();">Demo</a>
<a class="btn btn-large btn-success" ng-click="CallMe(3);">Start at step 3</a>
</div>
<div class="row-fluid marketing">
<div id="step2" class="span6">
<h4>Setup</h4>
<p>Include the JS and CSS files for intro.js, and angular-intro.min.js. Add the module <code>angular-intro</code> to your app declaration.</p>
<h4>Options</h4>
<p>Set the options like so: <code>ng-intro-options="IntroOptions"</code>. Define <code>$scope.IntroOptions</code> in your controller. The format is exactly the same as the <a href="https://github.com/usablica/intro.js#options">original</a>.</p>
<h4>Method name</h4>
<p>Pick a method name, <code>ng-intro-method="CallMe"</code>. You can invoke the intro from elsewhere by calling <code>CallMe();</code>. You can also specify a step number using <code>CallMe(3);</code>. To autostart, use <code>ng-intro-autostart="true"</code></p>
<h4>Callbacks</h4>
<p>You can get callbacks to your controller using the <code>ng-intro-oncomplete</code>, <code>ng-intro-onexit</code>, <code>ng-intro-onchange</code>, <code>ng-intro-onbeforechange</code> and <code>ng-intro-onafterchange</code> directives.</p>
<p>See <a href="https://github.com/mendhak/angular-intro.js/blob/master/example/index.html">index.html</a> and <a href="https://github.com/mendhak/angular-intro.js/blob/master/example/app.js">app.js</a> for usage code.</p>
</div>
<div id="step3" class="span6">
<h4><a href="https://github.com/mendhak/angular-intro.js/tree/master/example">Example</a></h4>
<p>Set the options and method name:
<pre>
<div ng-controller="MyController"
ng-intro-options="IntroOptions"
ng-intro-method="CallMe" ...
</pre>
</p>
<p>Options in the controller
<pre>
$scope.IntroOptions = {
steps:[
{
element: '#step1',
intro: "First tooltip"
},
{
element: '#step4',
intro: "Second tooltip",
position: 'right'
},
...
</pre>
</p>
<p>Call it either way
<pre><button ng-click="CallMe();">Go</button></pre>
<pre>$scope.CallMe();</pre>
</p>
</div>
</div>
<hr>
</div>
</div>
<script type="text/javascript" src="../bower_components/intro.js/minified/intro.min.js"></script>
<script type="text/javascript" src="../bower_components/angular/angular.min.js"></script>
<script type="text/javascript" src="../src/angular-intro.js"></script>
<script type="text/javascript" src="app.js"></script>
</body>
</html>