diff --git a/CHANGELOG.md b/CHANGELOG.md index 7fa0e4f..89dc53b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ + +### 0.5.2 (2016-11-30) + + ## 0.5.0 (2016-11-14) diff --git a/bower.json b/bower.json index 96b52f5..4496805 100644 --- a/bower.json +++ b/bower.json @@ -1,7 +1,7 @@ { "name": "angular-breadcrumb", "description": "AngularJS module that generates a breadcrumb from ui-router's states", - "version": "0.5.0", + "version": "0.5.2", "main": "release/angular-breadcrumb.js", "ignore": [ "sample", diff --git a/package.json b/package.json index 6f773eb..44eb988 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "angular-breadcrumb", "description": "AngularJS module that generates a breadcrumb from ui-router's states", - "version": "0.5.0", + "version": "0.5.2", "homepage": "http://ncuillery.github.io/angular-breadcrumb", "author": { "name": "Nicolas Cuillery", diff --git a/release/angular-breadcrumb.js b/release/angular-breadcrumb.js index ecbeeba..699030f 100644 --- a/release/angular-breadcrumb.js +++ b/release/angular-breadcrumb.js @@ -1,4 +1,4 @@ -/*! angular-breadcrumb - v0.5.0 +/*! angular-breadcrumb - v0.5.2 * http://ncuillery.github.io/angular-breadcrumb * Copyright (c) 2016 Nicolas Cuillery; Licensed MIT */ @@ -48,8 +48,8 @@ function $Breadcrumb() { var $lastViewScope = $rootScope; - // Early catch of $viewContentLoaded event - registerListenerOnce('$Breadcrumb.$viewContentLoaded', $rootScope, '$viewContentLoaded', function (event) { + // Early catch of $stateChangeSuccess event + registerListenerOnce('$Breadcrumb.$stateChangeSuccess', $rootScope, '$stateChangeSuccess', function (event) { // With nested views, the event occur several times, in "wrong" order if(!event.targetScope.ncyBreadcrumbIgnore && isAOlderThanB(event.targetScope.$id, $lastViewScope.$id)) { @@ -255,7 +255,7 @@ function BreadcrumbDirective($interpolate, $breadcrumb, $rootScope) { }); }; - registerListenerOnce('BreadcrumbDirective.$viewContentLoaded', $rootScope, '$viewContentLoaded', function (event) { + registerListenerOnce('BreadcrumbDirective.$stateChangeSuccess', $rootScope, '$stateChangeSuccess', function (event) { if(!event.targetScope.ncyBreadcrumbIgnore) { renderBreadcrumb(); } @@ -313,7 +313,7 @@ function BreadcrumbLastDirective($interpolate, $breadcrumb, $rootScope) { } }; - registerListenerOnce('BreadcrumbLastDirective.$viewContentLoaded', $rootScope, '$viewContentLoaded', function (event) { + registerListenerOnce('BreadcrumbLastDirective.$stateChangeSuccess', $rootScope, '$stateChangeSuccess', function (event) { if(!event.targetScope.ncyBreadcrumbIgnore) { renderLabel(); } @@ -381,7 +381,7 @@ function BreadcrumbTextDirective($interpolate, $breadcrumb, $rootScope) { scope.ncyBreadcrumbChain = combinedLabels.join(separator); }; - registerListenerOnce('BreadcrumbTextDirective.$viewContentLoaded', $rootScope, '$viewContentLoaded', function (event) { + registerListenerOnce('BreadcrumbTextDirective.$stateChangeSuccess', $rootScope, '$stateChangeSuccess', function (event) { if(!event.targetScope.ncyBreadcrumbIgnore) { renderLabel(); } diff --git a/release/angular-breadcrumb.min.js b/release/angular-breadcrumb.min.js index 1f3a44b..d4ade3f 100644 --- a/release/angular-breadcrumb.min.js +++ b/release/angular-breadcrumb.min.js @@ -1,4 +1,4 @@ -/*! angular-breadcrumb - v0.5.0 +/*! angular-breadcrumb - v0.5.2 * http://ncuillery.github.io/angular-breadcrumb * Copyright (c) 2016 Nicolas Cuillery; Licensed MIT */ -!function(a,b,c){"use strict";function d(a,c){return b.equals(a.length,c.length)?a>c:a.length>c.length}function e(a){var b=a.replace(/\n/g," ").match(/^([^(]+?)\s*(\((.*)\))?$/);if(!b||4!==b.length)throw new Error("Invalid state ref '"+a+"'");return{state:b[1],paramExpr:b[3]||null}}function f(a,b,d,e){var f=k[a];f!==c&&f(),f=b.$on(d,e),k[a]=f}function g(){var a={prefixStateName:null,template:"bootstrap3",templateUrl:null,templateLast:"default",templateLastUrl:null,includeAbstract:!1};this.setOptions=function(c){b.extend(a,c)},this.$get=["$state","$stateParams","$rootScope",function(b,g,h){var i=h;f("$Breadcrumb.$viewContentLoaded",h,"$viewContentLoaded",function(a){!a.targetScope.ncyBreadcrumbIgnore&&d(a.targetScope.$id,i.$id)&&(i=a.targetScope)});var j=function(a){var b=a.parent||(/^(.+)\.[^.]+$/.exec(a.name)||[])[1],c="object"==typeof b;return c?b.name:b},k=function(c,d){for(var f,h,j=e(d),k=!1,l=!1,m=0,n=c.length;n>m;m+=1)if(c[m].name===j.state)return;f=b.get(j.state),f.ncyBreadcrumb&&(f.ncyBreadcrumb.force&&(k=!0),f.ncyBreadcrumb.skip&&(l=!0)),f["abstract"]&&!a.includeAbstract&&!k||l||(j.paramExpr&&(h=i.$eval(j.paramExpr)),f.ncyBreadcrumbLink=b.href(j.state,h||g||{}),f.ncyBreadcrumbStateRef=d,c.unshift(f))},l=function(a){var c=e(a),d=b.get(c.state);if(d.ncyBreadcrumb&&d.ncyBreadcrumb.parent){var f="function"==typeof d.ncyBreadcrumb.parent,g=f?d.ncyBreadcrumb.parent(i):d.ncyBreadcrumb.parent;if(g)return g}return j(d)};return{getTemplate:function(b){return a.templateUrl?null:b[a.template]?b[a.template]:a.template},getTemplateUrl:function(){return a.templateUrl},getTemplateLast:function(b){return a.templateLastUrl?null:b[a.templateLast]?b[a.templateLast]:a.templateLast},getTemplateLastUrl:function(){return a.templateLastUrl},getStatesChain:function(c){for(var d=[],e=b.$current.self.name;e;e=l(e))if(k(d,e),c&&d.length)return d;return a.prefixStateName&&k(d,a.prefixStateName),d},getLastStep:function(){var a=this.getStatesChain(!0);return a.length?a[0]:c},$getLastViewScope:function(){return i}}}]}function h(a,c,d){var e={bootstrap2:'
',bootstrap3:''};return{restrict:"AE",replace:!0,scope:{},template:c.getTemplate(e),templateUrl:c.getTemplateUrl(),link:{post:function(e){var g=[],h=function(){n(g),g=[];var d=c.$getLastViewScope();e.steps=c.getStatesChain(),b.forEach(e.steps,function(b){if(b.ncyBreadcrumb&&b.ncyBreadcrumb.label){var c=a(b.ncyBreadcrumb.label);b.ncyBreadcrumbLabel=c(d),m(g,c,d,b)}else b.ncyBreadcrumbLabel=b.name})};f("BreadcrumbDirective.$viewContentLoaded",d,"$viewContentLoaded",function(a){a.targetScope.ncyBreadcrumbIgnore||h()}),h()}}}}function i(a,b,c){var d={"default":"{{ncyBreadcrumbLabel}}"};return{restrict:"A",scope:{},template:b.getTemplateLast(d),templateUrl:b.getTemplateLastUrl(),compile:function(d,e){var g=d.attr(e.$attr.ncyBreadcrumbLast);return g&&d.html(g),{post:function(d){var e=[],g=function(){n(e),e=[];var c=b.$getLastViewScope(),f=b.getLastStep();if(f)if(d.ncyBreadcrumbLink=f.ncyBreadcrumbLink,f.ncyBreadcrumb&&f.ncyBreadcrumb.label){var g=a(f.ncyBreadcrumb.label);d.ncyBreadcrumbLabel=g(c),m(e,g,c,d)}else d.ncyBreadcrumbLabel=f.name};f("BreadcrumbLastDirective.$viewContentLoaded",c,"$viewContentLoaded",function(a){a.targetScope.ncyBreadcrumbIgnore||g()}),g()}}}}}function j(a,c,d){return{restrict:"A",scope:{},template:"{{ncyBreadcrumbChain}}",compile:function(e,g){var h=e.attr(g.$attr.ncyBreadcrumbText);h&&e.html(h);var i=e.attr(g.$attr.ncyBreadcrumbTextSeparator)||" / ";return{post:function(e){var g=[],h=function(a,c,d){b.forEach(l(c),function(b){var c=d.$watch(b,function(a,b){a!==b&&j()});a.push(c)})},j=function(){n(g),g=[];var d=c.$getLastViewScope(),f=c.getStatesChain(),j=[];b.forEach(f,function(b){if(b.ncyBreadcrumb&&b.ncyBreadcrumb.label){var c=a(b.ncyBreadcrumb.label);j.push(c(d)),h(g,c,d)}else j.push(b.name)}),e.ncyBreadcrumbChain=j.join(i)};f("BreadcrumbTextDirective.$viewContentLoaded",d,"$viewContentLoaded",function(a){a.targetScope.ncyBreadcrumbIgnore||j()}),j()}}}}}var k={},l=function(a){if(a.expressions)return a.expressions;var c=[];return b.forEach(a.parts,function(a){b.isFunction(a)&&c.push(a.exp)}),c},m=function(a,c,d,e){b.forEach(l(c),function(b){var f=d.$watch(b,function(){e.ncyBreadcrumbLabel=c(d)});a.push(f)})},n=function(a){b.forEach(a,function(a){a()})};h.$inject=["$interpolate","$breadcrumb","$rootScope"],i.$inject=["$interpolate","$breadcrumb","$rootScope"],j.$inject=["$interpolate","$breadcrumb","$rootScope"],b.module("ncy-angular-breadcrumb",["ui.router.state"]).provider("$breadcrumb",g).directive("ncyBreadcrumb",h).directive("ncyBreadcrumbLast",i).directive("ncyBreadcrumbText",j)}(window,window.angular); \ No newline at end of file +!function(a,b,c){"use strict";function d(a,c){return b.equals(a.length,c.length)?a>c:a.length>c.length}function e(a){var b=a.replace(/\n/g," ").match(/^([^(]+?)\s*(\((.*)\))?$/);if(!b||4!==b.length)throw new Error("Invalid state ref '"+a+"'");return{state:b[1],paramExpr:b[3]||null}}function f(a,b,d,e){var f=k[a];f!==c&&f(),f=b.$on(d,e),k[a]=f}function g(){var a={prefixStateName:null,template:"bootstrap3",templateUrl:null,templateLast:"default",templateLastUrl:null,includeAbstract:!1};this.setOptions=function(c){b.extend(a,c)},this.$get=["$state","$stateParams","$rootScope",function(b,g,h){var i=h;f("$Breadcrumb.$stateChangeSuccess",h,"$stateChangeSuccess",function(a){!a.targetScope.ncyBreadcrumbIgnore&&d(a.targetScope.$id,i.$id)&&(i=a.targetScope)});var j=function(a){var b=a.parent||(/^(.+)\.[^.]+$/.exec(a.name)||[])[1],c="object"==typeof b;return c?b.name:b},k=function(c,d){for(var f,h,j=e(d),k=!1,l=!1,m=0,n=c.length;n>m;m+=1)if(c[m].name===j.state)return;f=b.get(j.state),f.ncyBreadcrumb&&(f.ncyBreadcrumb.force&&(k=!0),f.ncyBreadcrumb.skip&&(l=!0)),f["abstract"]&&!a.includeAbstract&&!k||l||(j.paramExpr&&(h=i.$eval(j.paramExpr)),f.ncyBreadcrumbLink=b.href(j.state,h||g||{}),f.ncyBreadcrumbStateRef=d,c.unshift(f))},l=function(a){var c=e(a),d=b.get(c.state);if(d.ncyBreadcrumb&&d.ncyBreadcrumb.parent){var f="function"==typeof d.ncyBreadcrumb.parent,g=f?d.ncyBreadcrumb.parent(i):d.ncyBreadcrumb.parent;if(g)return g}return j(d)};return{getTemplate:function(b){return a.templateUrl?null:b[a.template]?b[a.template]:a.template},getTemplateUrl:function(){return a.templateUrl},getTemplateLast:function(b){return a.templateLastUrl?null:b[a.templateLast]?b[a.templateLast]:a.templateLast},getTemplateLastUrl:function(){return a.templateLastUrl},getStatesChain:function(c){for(var d=[],e=b.$current.self.name;e;e=l(e))if(k(d,e),c&&d.length)return d;return a.prefixStateName&&k(d,a.prefixStateName),d},getLastStep:function(){var a=this.getStatesChain(!0);return a.length?a[0]:c},$getLastViewScope:function(){return i}}}]}function h(a,c,d){var e={bootstrap2:'',bootstrap3:''};return{restrict:"AE",replace:!0,scope:{},template:c.getTemplate(e),templateUrl:c.getTemplateUrl(),link:{post:function(e){var g=[],h=function(){n(g),g=[];var d=c.$getLastViewScope();e.steps=c.getStatesChain(),b.forEach(e.steps,function(b){if(b.ncyBreadcrumb&&b.ncyBreadcrumb.label){var c=a(b.ncyBreadcrumb.label);b.ncyBreadcrumbLabel=c(d),m(g,c,d,b)}else b.ncyBreadcrumbLabel=b.name})};f("BreadcrumbDirective.$stateChangeSuccess",d,"$stateChangeSuccess",function(a){a.targetScope.ncyBreadcrumbIgnore||h()}),h()}}}}function i(a,b,c){var d={"default":"{{ncyBreadcrumbLabel}}"};return{restrict:"A",scope:{},template:b.getTemplateLast(d),templateUrl:b.getTemplateLastUrl(),compile:function(d,e){var g=d.attr(e.$attr.ncyBreadcrumbLast);return g&&d.html(g),{post:function(d){var e=[],g=function(){n(e),e=[];var c=b.$getLastViewScope(),f=b.getLastStep();if(f)if(d.ncyBreadcrumbLink=f.ncyBreadcrumbLink,f.ncyBreadcrumb&&f.ncyBreadcrumb.label){var g=a(f.ncyBreadcrumb.label);d.ncyBreadcrumbLabel=g(c),m(e,g,c,d)}else d.ncyBreadcrumbLabel=f.name};f("BreadcrumbLastDirective.$stateChangeSuccess",c,"$stateChangeSuccess",function(a){a.targetScope.ncyBreadcrumbIgnore||g()}),g()}}}}}function j(a,c,d){return{restrict:"A",scope:{},template:"{{ncyBreadcrumbChain}}",compile:function(e,g){var h=e.attr(g.$attr.ncyBreadcrumbText);h&&e.html(h);var i=e.attr(g.$attr.ncyBreadcrumbTextSeparator)||" / ";return{post:function(e){var g=[],h=function(a,c,d){b.forEach(l(c),function(b){var c=d.$watch(b,function(a,b){a!==b&&j()});a.push(c)})},j=function(){n(g),g=[];var d=c.$getLastViewScope(),f=c.getStatesChain(),j=[];b.forEach(f,function(b){if(b.ncyBreadcrumb&&b.ncyBreadcrumb.label){var c=a(b.ncyBreadcrumb.label);j.push(c(d)),h(g,c,d)}else j.push(b.name)}),e.ncyBreadcrumbChain=j.join(i)};f("BreadcrumbTextDirective.$stateChangeSuccess",d,"$stateChangeSuccess",function(a){a.targetScope.ncyBreadcrumbIgnore||j()}),j()}}}}}var k={},l=function(a){if(a.expressions)return a.expressions;var c=[];return b.forEach(a.parts,function(a){b.isFunction(a)&&c.push(a.exp)}),c},m=function(a,c,d,e){b.forEach(l(c),function(b){var f=d.$watch(b,function(){e.ncyBreadcrumbLabel=c(d)});a.push(f)})},n=function(a){b.forEach(a,function(a){a()})};h.$inject=["$interpolate","$breadcrumb","$rootScope"],i.$inject=["$interpolate","$breadcrumb","$rootScope"],j.$inject=["$interpolate","$breadcrumb","$rootScope"],b.module("ncy-angular-breadcrumb",["ui.router.state"]).provider("$breadcrumb",g).directive("ncyBreadcrumb",h).directive("ncyBreadcrumbLast",i).directive("ncyBreadcrumbText",j)}(window,window.angular); \ No newline at end of file diff --git a/sample/angular-breadcrumb-0.5.0.zip b/sample/angular-breadcrumb-0.5.0.zip deleted file mode 100644 index 985e4bc..0000000 Binary files a/sample/angular-breadcrumb-0.5.0.zip and /dev/null differ diff --git a/sample/angular-breadcrumb-0.5.2.zip b/sample/angular-breadcrumb-0.5.2.zip new file mode 100644 index 0000000..a065696 Binary files /dev/null and b/sample/angular-breadcrumb-0.5.2.zip differ diff --git a/sample/views/home.html b/sample/views/home.html index 1faedf9..6e2fc86 100644 --- a/sample/views/home.html +++ b/sample/views/home.html @@ -16,7 +16,7 @@
View on GitHub
-
-
Download (0.5.0)
+
+
Download (0.5.2)
\ No newline at end of file
diff --git a/src/angular-breadcrumb.js b/src/angular-breadcrumb.js
index 696ec56..7c28077 100644
--- a/src/angular-breadcrumb.js
+++ b/src/angular-breadcrumb.js
@@ -43,8 +43,8 @@ function $Breadcrumb() {
var $lastViewScope = $rootScope;
- // Early catch of $viewContentLoaded event
- registerListenerOnce('$Breadcrumb.$viewContentLoaded', $rootScope, '$viewContentLoaded', function (event) {
+ // Early catch of $stateChangeSuccess event
+ registerListenerOnce('$Breadcrumb.$stateChangeSuccess', $rootScope, '$stateChangeSuccess', function (event) {
// With nested views, the event occur several times, in "wrong" order
if(!event.targetScope.ncyBreadcrumbIgnore &&
isAOlderThanB(event.targetScope.$id, $lastViewScope.$id)) {
@@ -250,7 +250,7 @@ function BreadcrumbDirective($interpolate, $breadcrumb, $rootScope) {
});
};
- registerListenerOnce('BreadcrumbDirective.$viewContentLoaded', $rootScope, '$viewContentLoaded', function (event) {
+ registerListenerOnce('BreadcrumbDirective.$stateChangeSuccess', $rootScope, '$stateChangeSuccess', function (event) {
if(!event.targetScope.ncyBreadcrumbIgnore) {
renderBreadcrumb();
}
@@ -308,7 +308,7 @@ function BreadcrumbLastDirective($interpolate, $breadcrumb, $rootScope) {
}
};
- registerListenerOnce('BreadcrumbLastDirective.$viewContentLoaded', $rootScope, '$viewContentLoaded', function (event) {
+ registerListenerOnce('BreadcrumbLastDirective.$stateChangeSuccess', $rootScope, '$stateChangeSuccess', function (event) {
if(!event.targetScope.ncyBreadcrumbIgnore) {
renderLabel();
}
@@ -376,7 +376,7 @@ function BreadcrumbTextDirective($interpolate, $breadcrumb, $rootScope) {
scope.ncyBreadcrumbChain = combinedLabels.join(separator);
};
- registerListenerOnce('BreadcrumbTextDirective.$viewContentLoaded', $rootScope, '$viewContentLoaded', function (event) {
+ registerListenerOnce('BreadcrumbTextDirective.$stateChangeSuccess', $rootScope, '$stateChangeSuccess', function (event) {
if(!event.targetScope.ncyBreadcrumbIgnore) {
renderLabel();
}
diff --git a/test/spec/directive-basic-test.js b/test/spec/directive-basic-test.js
index cd5b06d..7f9fad5 100644
--- a/test/spec/directive-basic-test.js
+++ b/test/spec/directive-basic-test.js
@@ -18,7 +18,7 @@ describe('Breadcrumb directive with basic conf', function() {
it('renders the correct state chain', inject(function() {
goToState('D');
- scope.$emit('$viewContentLoaded');
+ scope.$emit('$stateChangeSuccess');
scope.$digest();
console.info('Directive content : ' + element.text());
@@ -37,7 +37,7 @@ describe('Breadcrumb directive with basic conf', function() {
it('should work with one state', inject(function() {
goToState('A');
- scope.$emit('$viewContentLoaded');
+ scope.$emit('$stateChangeSuccess');
scope.$digest();
console.info('Directive content : ' + element.text());
diff --git a/test/spec/directive-dynamic-parent-test.js b/test/spec/directive-dynamic-parent-test.js
index 1cdb0da..583c995 100644
--- a/test/spec/directive-dynamic-parent-test.js
+++ b/test/spec/directive-dynamic-parent-test.js
@@ -22,7 +22,7 @@ describe('Breadcrumb directive with dynamic parent conf', function() {
compile(scope);
expect(scope.parentState).toBeDefined();
- scope.$emit('$viewContentLoaded');
+ scope.$emit('$stateChangeSuccess');
scope.$digest();
console.info('Directive content : ' + element.text());
@@ -39,7 +39,7 @@ describe('Breadcrumb directive with dynamic parent conf', function() {
compile(scope);
expect(scope.parentState).toBeUndefined();
- scope.$emit('$viewContentLoaded');
+ scope.$emit('$stateChangeSuccess');
scope.$digest();
console.info('Directive content : ' + element.text());
@@ -55,7 +55,7 @@ describe('Breadcrumb directive with dynamic parent conf', function() {
compile(scope);
- scope.$emit('$viewContentLoaded');
+ scope.$emit('$stateChangeSuccess');
scope.$digest();
console.info('Directive content : ' + element.text());
diff --git a/test/spec/directive-interpolation-test.js b/test/spec/directive-interpolation-test.js
index f79ff3a..8ff317f 100644
--- a/test/spec/directive-interpolation-test.js
+++ b/test/spec/directive-interpolation-test.js
@@ -23,7 +23,7 @@ describe('Breadcrumb directive with interpolation conf', function() {
expect(scope.tripleB).toBeDefined();
- scope.$emit('$viewContentLoaded');
+ scope.$emit('$stateChangeSuccess');
scope.$digest();
console.info('Directive content : ' + element.text());
@@ -39,7 +39,7 @@ describe('Breadcrumb directive with interpolation conf', function() {
controller('BCtrl', {'$scope' : scope} );
compile(scope);
- scope.$emit('$viewContentLoaded');
+ scope.$emit('$stateChangeSuccess');
scope.$digest();
console.info('Directive content : ' + element.text());
diff --git a/test/spec/directive-last-basic-test.js b/test/spec/directive-last-basic-test.js
index 1ec1245..07eb073 100644
--- a/test/spec/directive-last-basic-test.js
+++ b/test/spec/directive-last-basic-test.js
@@ -20,7 +20,7 @@ describe('Last step directive with basic conf', function() {
it('renders the last step label correctly', inject(function() {
goToState('D');
- scope.$emit('$viewContentLoaded');
+ scope.$emit('$stateChangeSuccess');
scope.$digest();
console.info('Directive content : ' + element.text());
@@ -41,7 +41,7 @@ describe('Last step directive with basic conf', function() {
it('renders the template correctly', inject(function() {
goToState('D');
- scope.$emit('$viewContentLoaded');
+ scope.$emit('$stateChangeSuccess');
scope.$digest();
console.info('Directive content : ' + element.text());
@@ -71,7 +71,7 @@ describe('Last step directive with basic conf', function() {
it('correctly', inject(function() {
goToState('D');
- scope.$emit('$viewContentLoaded');
+ scope.$emit('$stateChangeSuccess');
scope.$digest();
console.info('Directive content : ' + element.html());
@@ -101,7 +101,7 @@ describe('Last step directive with basic conf', function() {
it('correctly', inject(function() {
goToState('html');
- scope.$emit('$viewContentLoaded');
+ scope.$emit('$stateChangeSuccess');
scope.$digest();
console.info('Directive content : ' + element.html());
diff --git a/test/spec/directive-last-interpolation-test.js b/test/spec/directive-last-interpolation-test.js
index 081fae4..e8a93fa 100644
--- a/test/spec/directive-last-interpolation-test.js
+++ b/test/spec/directive-last-interpolation-test.js
@@ -23,7 +23,7 @@ describe('Last step directive with interpolation conf', function() {
expect(scope.tripleB).toBeDefined();
- scope.$emit('$viewContentLoaded');
+ scope.$emit('$stateChangeSuccess');
scope.$digest();
console.info('Directive content : ' + element.text());
@@ -37,7 +37,7 @@ describe('Last step directive with interpolation conf', function() {
controller('BCtrl', {'$scope' : scope} );
compile(scope);
- scope.$emit('$viewContentLoaded');
+ scope.$emit('$stateChangeSuccess');
scope.$digest();
console.info('Directive content : ' + element.text());
diff --git a/test/spec/directive-last-sample-test.js b/test/spec/directive-last-sample-test.js
index 2fe9f0f..b6bbba3 100644
--- a/test/spec/directive-last-sample-test.js
+++ b/test/spec/directive-last-sample-test.js
@@ -23,7 +23,7 @@ describe('Last step directive with sample conf', function() {
expect(scope.room).toBeDefined();
- scope.$emit('$viewContentLoaded');
+ scope.$emit('$stateChangeSuccess');
scope.$digest();
console.info('Directive content : ' + element.text());
diff --git a/test/spec/directive-ncyBreadcrumbIgnore-test.js b/test/spec/directive-ncyBreadcrumbIgnore-test.js
index 51ff3e3..062c5dd 100644
--- a/test/spec/directive-ncyBreadcrumbIgnore-test.js
+++ b/test/spec/directive-ncyBreadcrumbIgnore-test.js
@@ -21,7 +21,7 @@ describe('Breadcrumb directive with multiple-interpolation conf', function() {
it('renders the correct state chain and views content', inject(function () {
goToState('A.B');
- scope.$emit('$viewContentLoaded');
+ scope.$emit('$stateChangeSuccess');
scope.$digest();
console.info('Directive content : ' + element.text());
@@ -41,7 +41,7 @@ describe('Breadcrumb directive with multiple-interpolation conf', function() {
it('renders the incorrect state chain', inject(function () {
goToState('A.B');
- scope.$emit('$viewContentLoaded');
+ scope.$emit('$stateChangeSuccess');
scope.$digest();
console.info('Directive content : ' + element.text());
@@ -74,7 +74,7 @@ describe('Breadcrumb directive with multiple-interpolation conf', function() {
it('renders the correct state chain and views content', inject(function () {
goToState('A.B');
- scope.$emit('$viewContentLoaded');
+ scope.$emit('$stateChangeSuccess');
scope.$digest();
console.info('Directive content : ' + element.text());
@@ -95,7 +95,7 @@ describe('Breadcrumb directive with multiple-interpolation conf', function() {
it('renders the correct state chain and views content', inject(function () {
goToState('A.B');
- scope.$emit('$viewContentLoaded');
+ scope.$emit('$stateChangeSuccess');
scope.$digest();
console.info('Directive content : ' + element.text());
diff --git a/test/spec/directive-object-parent-test.js b/test/spec/directive-object-parent-test.js
index 14435da..0e25dda 100644
--- a/test/spec/directive-object-parent-test.js
+++ b/test/spec/directive-object-parent-test.js
@@ -18,7 +18,7 @@ describe('Breadcrumb directive with object parent conf', function() {
it('should handle parents provided by object reference', inject(function() {
goToState('B');
- scope.$emit('$viewContentLoaded');
+ scope.$emit('$stateChangeSuccess');
scope.$digest();
console.info('Directive content : ' + element.text());
diff --git a/test/spec/directive-sample-test.js b/test/spec/directive-sample-test.js
index 4622e69..dd3b974 100644
--- a/test/spec/directive-sample-test.js
+++ b/test/spec/directive-sample-test.js
@@ -23,7 +23,7 @@ describe('Breadcrumb directive with sample conf', function() {
expect(scope.room).toBeDefined();
- scope.$emit('$viewContentLoaded');
+ scope.$emit('$stateChangeSuccess');
scope.$digest();
console.info('Directive content : ' + element.text());
diff --git a/test/spec/directive-template-test.js b/test/spec/directive-template-test.js
index 9a92ce2..2c233ee 100644
--- a/test/spec/directive-template-test.js
+++ b/test/spec/directive-template-test.js
@@ -19,7 +19,7 @@ describe('Breadcrumb directive', function() {
it('correctly', inject(function() {
goToState('D');
- scope.$emit('$viewContentLoaded');
+ scope.$emit('$stateChangeSuccess');
scope.$digest();
console.info('Directive content : ' + element.text());
@@ -52,7 +52,7 @@ describe('Breadcrumb directive', function() {
it('correctly', inject(function() {
goToState('D');
- scope.$emit('$viewContentLoaded');
+ scope.$emit('$stateChangeSuccess');
scope.$digest();
console.info('Directive content : ' + element.text());
@@ -89,7 +89,7 @@ describe('Breadcrumb directive', function() {
it('correctly', inject(function() {
goToState('D');
- scope.$emit('$viewContentLoaded');
+ scope.$emit('$stateChangeSuccess');
scope.$digest();
console.info('Directive content : ' + element.html());
@@ -124,7 +124,7 @@ describe('Breadcrumb directive', function() {
it('correctly', inject(function() {
goToState('html');
- scope.$emit('$viewContentLoaded');
+ scope.$emit('$stateChangeSuccess');
scope.$digest();
console.info('Directive content : ' + element.html());
diff --git a/test/spec/directive-text-basic-separator-test.js b/test/spec/directive-text-basic-separator-test.js
index 10623ad..bab883f 100644
--- a/test/spec/directive-text-basic-separator-test.js
+++ b/test/spec/directive-text-basic-separator-test.js
@@ -20,7 +20,7 @@ describe('Text directive with separator with basic conf', function() {
it('renders the text label correctly', inject(function() {
goToState('D');
- scope.$emit('$viewContentLoaded');
+ scope.$emit('$stateChangeSuccess');
scope.$digest();
console.info('Directive content : ' + element.text());
@@ -41,7 +41,7 @@ describe('Text directive with separator with basic conf', function() {
it('renders the template correctly', inject(function() {
goToState('D');
- scope.$emit('$viewContentLoaded');
+ scope.$emit('$stateChangeSuccess');
scope.$digest();
console.info('Directive content : ' + element.text());
diff --git a/test/spec/directive-text-basic-test.js b/test/spec/directive-text-basic-test.js
index f74b370..05d6c50 100644
--- a/test/spec/directive-text-basic-test.js
+++ b/test/spec/directive-text-basic-test.js
@@ -20,7 +20,7 @@ describe('Text directive with basic conf', function() {
it('renders the text label correctly', inject(function() {
goToState('D');
- scope.$emit('$viewContentLoaded');
+ scope.$emit('$stateChangeSuccess');
scope.$digest();
console.info('Directive content : ' + element.text());
@@ -41,7 +41,7 @@ describe('Text directive with basic conf', function() {
it('renders the template correctly', inject(function() {
goToState('D');
- scope.$emit('$viewContentLoaded');
+ scope.$emit('$stateChangeSuccess');
scope.$digest();
console.info('Directive content : ' + element.text());
diff --git a/test/spec/directive-text-interpolation-test.js b/test/spec/directive-text-interpolation-test.js
index f9fd3d6..8838c3a 100644
--- a/test/spec/directive-text-interpolation-test.js
+++ b/test/spec/directive-text-interpolation-test.js
@@ -23,7 +23,7 @@ describe('Text directive with interpolation conf', function() {
expect(scope.tripleB).toBeDefined();
- scope.$emit('$viewContentLoaded');
+ scope.$emit('$stateChangeSuccess');
scope.$digest();
console.info('Directive content : ' + element.text());
@@ -37,7 +37,7 @@ describe('Text directive with interpolation conf', function() {
controller('BCtrl', {'$scope' : scope} );
compile(scope);
- scope.$emit('$viewContentLoaded');
+ scope.$emit('$stateChangeSuccess');
scope.$digest();
console.info('Directive content : ' + element.text());
diff --git a/test/spec/directive-text-sample-test.js b/test/spec/directive-text-sample-test.js
index 5b1e694..d2b934a 100644
--- a/test/spec/directive-text-sample-test.js
+++ b/test/spec/directive-text-sample-test.js
@@ -23,7 +23,7 @@ describe('Text directive with sample conf', function() {
expect(scope.room).toBeDefined();
- scope.$emit('$viewContentLoaded');
+ scope.$emit('$stateChangeSuccess');
scope.$digest();
console.info('Directive content : ' + element.text());
diff --git a/test/spec/directive-ui-sref-template-test.js b/test/spec/directive-ui-sref-template-test.js
index 83dc216..94d2fc0 100644
--- a/test/spec/directive-ui-sref-template-test.js
+++ b/test/spec/directive-ui-sref-template-test.js
@@ -18,7 +18,7 @@ describe('Breadcrumb directive with ui-sref template', function() {
it('should work correctly', inject(function() {
goToState('A.B');
- scope.$emit('$viewContentLoaded');
+ scope.$emit('$stateChangeSuccess');
scope.$digest();
console.info('Directive content : ' + element.text());
@@ -30,7 +30,7 @@ describe('Breadcrumb directive with ui-sref template', function() {
it('should deal with url params correctly', inject(function() {
goToState('J');
- scope.$emit('$viewContentLoaded');
+ scope.$emit('$stateChangeSuccess');
scope.$digest();
console.info('Directive content : ' + element.text());
@@ -44,7 +44,7 @@ describe('Breadcrumb directive with ui-sref template', function() {
it('should deal with url params correctly even with dynamic parent', inject(function() {
goToState('K');
- scope.$emit('$viewContentLoaded');
+ scope.$emit('$stateChangeSuccess');
scope.$digest();
console.info('Directive content : ' + element.text());