您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

toolbar.controller.js 860B

12345678910111213141516171819202122232425262728
  1. /**
  2. * Created by robin on 11/1/15.
  3. */
  4. angular.module('app')
  5. .controller('ToolBarController', ['$scope', '$state', '$mdSidenav', 'DataShareBusiness',
  6. function($scope, $state, $mdSidenav, DataShareBusiness) {
  7. $scope.DataShareBusiness = DataShareBusiness;
  8. $scope.toggleSideBar = function()
  9. {
  10. $mdSidenav('left').toggle();
  11. };
  12. $scope.isInState = function(state)
  13. {
  14. return $state.current.name == state;
  15. };
  16. $scope.getStateName = function()
  17. {
  18. if ($state.current.name.length == 0) {
  19. return "home";
  20. }
  21. return $state.current.name;
  22. };
  23. }]);