Skip to content

Commit

Permalink
Merge bdb89f3 into 301df63
Browse files Browse the repository at this point in the history
  • Loading branch information
muhammedbaderdien committed Jul 19, 2017
2 parents 301df63 + bdb89f3 commit 98f2a38
Show file tree
Hide file tree
Showing 24 changed files with 55 additions and 51 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
<a name="0.5.2"></a>
### 0.5.2 (2016-11-30)


<a name="0.5.0"></a>
## 0.5.0 (2016-11-14)

Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
12 changes: 6 additions & 6 deletions release/angular-breadcrumb.js
Original file line number Diff line number Diff line change
@@ -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 */

Expand Down Expand Up @@ -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)) {
Expand Down Expand Up @@ -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();
}
Expand Down Expand Up @@ -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();
}
Expand Down Expand Up @@ -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();
}
Expand Down
4 changes: 2 additions & 2 deletions release/angular-breadcrumb.min.js

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

Binary file removed sample/angular-breadcrumb-0.5.0.zip
Binary file not shown.
Binary file added sample/angular-breadcrumb-0.5.2.zip
Binary file not shown.
4 changes: 2 additions & 2 deletions sample/views/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ <h2>Key features</h2>
<a href="https://github.com/ncuillery/angular-breadcrumb" class="btn btn-large">
<img src="img/GitHub-Mark-24px.png" alt="GitHub"/> View on GitHub
</a>
<a href="angular-breadcrumb-0.5.0.zip" class="btn btn-large btn-primary">
<img src="img/download-24px.png" alt="Download"/> Download <small>(0.5.0)</small>
<a href="angular-breadcrumb-0.5.2.zip" class="btn btn-large btn-primary">
<img src="img/download-24px.png" alt="Download"/> Download <small>(0.5.2)</small>
</a>
</div>
10 changes: 5 additions & 5 deletions src/angular-breadcrumb.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down Expand Up @@ -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();
}
Expand Down Expand Up @@ -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();
}
Expand Down Expand Up @@ -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();
}
Expand Down
4 changes: 2 additions & 2 deletions test/spec/directive-basic-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand All @@ -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());
Expand Down
6 changes: 3 additions & 3 deletions test/spec/directive-dynamic-parent-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand All @@ -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());
Expand All @@ -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());
Expand Down
4 changes: 2 additions & 2 deletions test/spec/directive-interpolation-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand All @@ -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());
Expand Down
Loading

0 comments on commit 98f2a38

Please sign in to comment.