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 452712a
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 4 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@
],
"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",
"angular-ui-bootstrap": "~1.2.1",
"angular-ui-codemirror": "jpetitcolas/ui-codemirror#di",
"angular-ui-router": "^0.2.14",
"angular-ui-router": "~0.4.0",
"bootstrap-sass": "^3.3.7",
"codemirror": "^5.2.0",
"core-js": "^0.6.1",
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 452712a

Please sign in to comment.