Skip to content

Commit

Permalink
Angular 1.6
Browse files Browse the repository at this point in the history
  • Loading branch information
Kmaschta committed Jan 20, 2017
1 parent 4544128 commit cfe6b8b
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
],
"dependencies": {
"admin-config": "~0.12.1",
"angular": "~1.5.11",
"angular": "~1.6.1",
"angular-numeraljs": "^1.1.6",
"angular-sanitize": "^1.3.15",
"angular-translate": "^2.11.0",
Expand Down
1 change: 1 addition & 0 deletions src/javascripts/ng-admin/Main/MainModule.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ MainModule.directive('maMenuBar', require('./component/directive/maMenuBar'));
MainModule.config(require('./config/http'));
MainModule.config(require('./config/routing'));
MainModule.config(require('./config/translate'));
MainModule.config(require('./config/location'));

MainModule.run(require('./run/HttpErrorHandler'));
MainModule.run(require('./run/Loader'));
10 changes: 10 additions & 0 deletions src/javascripts/ng-admin/Main/config/location.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
const location = ($locationProvider) => {
// Keep the start of all routes to #/ instead of #!/
// while updating to Angular 1.6
// @see https://docs.angularjs.org/guide/migration#commit-aa077e8
$locationProvider.hashPrefix('');
};

location.$inject = ['$locationProvider'];

export default location;
4 changes: 2 additions & 2 deletions src/javascripts/test/unit/Crud/field/maCheckboxFieldSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ describe('directive: checkbox-field', function () {
scope.value = true;
var element = $compile(directiveUsage)(scope);
scope.$digest();
expect(element.find('input').attr('checked')).toBeTruthy();
expect(element[0].querySelector(':checked')).toBeTruthy();
scope.value = false;
scope.$digest();
expect(element.find('input').attr('checked')).toBeFalsy();
expect(element[0].querySelector(':checked')).toBeFalsy();
});
});

0 comments on commit cfe6b8b

Please sign in to comment.