From bdb89f3b529c2a987a0fdeb0690efb9120be6bdc Mon Sep 17 00:00:00 2001 From: James Gill Date: Wed, 30 Nov 2016 10:13:40 +1000 Subject: [PATCH] currently failing on 3 tests as part of `Breadcrumb directive with multiple-interpolation conf` test - renders the correct state chain and views content, - renders the correct state chain and views content, and - renders the correct state chain and views content change all occurences of `$viewContentLoaded` to `$stateChangeSuccess` --- CHANGELOG.md | 4 ++++ bower.json | 2 +- package.json | 2 +- release/angular-breadcrumb.js | 12 ++++++------ release/angular-breadcrumb.min.js | 4 ++-- sample/angular-breadcrumb-0.5.0.zip | Bin 6241 -> 0 bytes sample/angular-breadcrumb-0.5.2.zip | Bin 0 -> 6260 bytes sample/views/home.html | 4 ++-- src/angular-breadcrumb.js | 10 +++++----- test/spec/directive-basic-test.js | 4 ++-- test/spec/directive-dynamic-parent-test.js | 6 +++--- test/spec/directive-interpolation-test.js | 4 ++-- test/spec/directive-last-basic-test.js | 8 ++++---- test/spec/directive-last-interpolation-test.js | 4 ++-- test/spec/directive-last-sample-test.js | 2 +- test/spec/directive-ncyBreadcrumbIgnore-test.js | 8 ++++---- test/spec/directive-object-parent-test.js | 2 +- test/spec/directive-sample-test.js | 2 +- test/spec/directive-template-test.js | 8 ++++---- test/spec/directive-text-basic-separator-test.js | 4 ++-- test/spec/directive-text-basic-test.js | 4 ++-- test/spec/directive-text-interpolation-test.js | 4 ++-- test/spec/directive-text-sample-test.js | 2 +- test/spec/directive-ui-sref-template-test.js | 6 +++--- 24 files changed, 55 insertions(+), 51 deletions(-) delete mode 100644 sample/angular-breadcrumb-0.5.0.zip create mode 100644 sample/angular-breadcrumb-0.5.2.zip 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 985e4bcfb287a1fc85a79db9060b25f41de63812..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6241 zcmZ{oRZtvCw}mH!;O_43E`z%h+}#Q848elC4FnJF794^H8$4Km!QF$q-JCiP_pe+3 zUHhSTS9Pt|{?<}cdJl^OK=?b7P0k8{{}Arq-Q3yM%hBAO)xzD{+{)73%gKW6lgFvy zy2tVmX5fOU+m@^3uR;kS`zN!^TS&sHpKQEHeYP-U6a|({W&ooXCf_Rl=UdnM+A0}Z z@0UWY60r9uep2u0+Ut+iv)kUoq5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SzG=VaE1yOA%=xEYUlq zeCB*lFD;9?!THRP<2D2-e(vrON*pQii|3{QeLwgBpYgkNocu&lshKJeF`Xcog5HOy$@S~+G2w|0_3?pmP*=OhuLh1A>L zJlPd+!s@e42WQTHT3P}4_7QC1gdU+@^V=?4JuOTG0xWdww-9O2!rWXpZ$OQZmrusP zdzf{FPh+-?y!!L9rkzSPJ(voyfe(7ShEkiAx$qT#PXHo_+^<`> zShkfLR$S*elz4>rv?yh^A_U^@9G&?%pVGE&Qz|Vf~r+phCExroO=g_`V zcx}#ZRCLO!$BE6L_2yS&+xFjdH)DF4C?gk&--Kzo>a9vz8k)i`RTjo{NK_OJ7QXvt z3wFvuSbLOSng$!yV_bzFkflY2R<@oiRn~vw7wz#g9dC3?M8F( z0083Oj$Tda9SjcOe=Gd|#D;$={C`CODE{)#_FoJA|7-D|_W$t3zxv0b^e>P67mI&s WLrv)e+&@oY{!Yx_vk(8D+y4NQ3*gNF diff --git a/sample/angular-breadcrumb-0.5.2.zip b/sample/angular-breadcrumb-0.5.2.zip new file mode 100644 index 0000000000000000000000000000000000000000..a065696019c54bc7cfbf99c0b7396458cd4b92f4 GIT binary patch literal 6260 zcmZ{oRZtx27Nv0r!5Vi0K^xZuXx!c1rSZmHg1bWlfySNS?iO5wYj6oJfk5y%r|!et zn!2<0!@qacU+ei>OH~082_FvapRrNZ%-QVR z&J7@L>urG73ln&I9tNOVIqmYD1TNj)ehMG=1;3lzrSRt-lB^IGKAwscsL62I+om-< z3tCD(OJ|SrdPR>aO?_;@z(puBZ$J}!;h95@^ib-&xb#h%ZeCst!|tx_-;t|_&5!j} z-xgz!d19C4vc`7>KnmXu9(fdh+h*YGZ5>pe((oH-(?pHzKFnJO;)>9_dxtIYP8|}shrhagy z0&J-(J(6v|pzb!CJ*(Gmpk<0P3dva4?O54PI!Sc2y145~Nim7&sL=(c#O5cxPv52i zhWUOb;*M%Sd*3c!q>D0NyL#(DgJRBs^`i)Aj52Q$x@QuaI^r~JG9lBy`~i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`&MsQQENCRlNd;GnyP&r_2=2#Vmd;_L z^7E}8Phgd{nd2MkzhIyP%W|4Sg@Xh9Q`@U5z$4(p{ohvqzoFsZR{uZx09PFR@Af}C r{{PqFzwQ5}i~s0fi_U*&Key features GitHub View on GitHub - - Download Download (0.5.0) + + Download 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());