Skip to content
This repository was archived by the owner on Jan 17, 2022. It is now read-only.

Add support for angular 1.3 & 1.4 #63

Merged
merged 5 commits into from
Sep 11, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@ module.exports = function(grunt) {
jshint: {
lib: {
options: {},
src: ['lib/*.js']
src: ['src/*.js']
},
},
watch: {
scripts: {
files: 'lib/*.js',
files: 'src/*.js',
tasks: ['jshint', 'uglify'],
options: {
interrupt: true
Expand All @@ -54,4 +54,7 @@ module.exports = function(grunt) {

// Default task(s).
grunt.registerTask('default', ['jshint', 'uglify']);

// Test
grunt.registerTask('test', ['jshint']);
};
6 changes: 3 additions & 3 deletions bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "angular-intro.js",
"version": "1.2.7",
"version": "1.3.0",
"main": "src/angular-intro.js",
"description": "Angular directive to wrap intro.js",
"license": "MIT",
Expand All @@ -12,8 +12,8 @@
"assets"
],
"dependencies": {
"angular": "~1.2.x",
"intro.js": "1.1.0"
"angular": "~1.4.0",
"intro.js": "~1.1.1"
},
"devDependencies": {}
}
2 changes: 1 addition & 1 deletion build/angular-intro.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions example/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@

</head>
<body>
<div class="container-narrow" ng-controller="MyController"
ng-intro-options="IntroOptions" ng-intro-method="CallMe"
<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"
Expand Down Expand Up @@ -92,6 +92,7 @@ <h4><a href="https://github.com/mendhak/angular-intro.js/tree/master/example">Ex

<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>
Expand Down
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "angular-intro.js",
"version": "0.1.0",
"version": "1.3.0",
"description": "Angular directive to wrap intro.js",
"main": "src/angular-intro.js",
"directories": {
Expand All @@ -26,13 +26,13 @@
},
"homepage": "https://github.com/mendhak/angular-intro.js",
"devDependencies": {
"bower": "~1.3.1",
"grunt": "~0.4.4",
"bower": "~1.5.2",
"grunt": "~0.4.5",
"grunt-cli": "~0.1.13",
"grunt-contrib-connect": "^0.11.2",
"grunt-contrib-jshint": "~0.9.2",
"grunt-contrib-uglify": "~0.4.0",
"grunt-contrib-jshint": "~0.11.3",
"grunt-contrib-uglify": "~0.9.2",
"grunt-contrib-watch": "~0.6.1",
"load-grunt-tasks": "~0.4.0"
"load-grunt-tasks": "~3.2.0"
}
}
14 changes: 7 additions & 7 deletions src/angular-intro.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,37 +60,37 @@
if (scope.ngIntroOncomplete) {
intro.oncomplete(function() {
scope.ngIntroOncomplete.call(this, scope);
$timeout(function() {scope.$digest()});
$timeout(function() {scope.$digest();});
navigationWatch();
});
}

if (scope.ngIntroOnexit) {
intro.onexit(function() {
scope.ngIntroOnexit.call(this, scope);
$timeout(function() {scope.$digest()});
$timeout(function() {scope.$digest();});
navigationWatch();
});
}

if (scope.ngIntroOnchange) {
intro.onchange(function(targetElement){
scope.ngIntroOnchange.call(this, targetElement, scope);
$timeout(function() {scope.$digest()});
$timeout(function() {scope.$digest();});
});
}

if (scope.ngIntroOnbeforechange) {
intro.onbeforechange(function(targetElement) {
scope.ngIntroOnbeforechange.call(this, targetElement, scope);
$timeout(function() {scope.$digest()});
$timeout(function() {scope.$digest();});
});
}

if (scope.ngIntroOnafterchange) {
intro.onafterchange(function(targetElement){
scope.ngIntroOnafterchange.call(this, targetElement, scope);
$timeout(function() {scope.$digest()});
$timeout(function() {scope.$digest();});
});
}

Expand All @@ -103,11 +103,11 @@

scope.ngIntroNextMethod = function () {
intro.nextStep();
}
};

scope.ngIntroPreviousMethod = function () {
intro.previousStep();
}
};

scope.ngIntroExitMethod = function (callback) {
intro.exit();
Expand Down