Skip to content
This repository was archived by the owner on Oct 2, 2019. It is now read-only.

when use 'v0.19.7',find a error 'function(uiSelectConfig) is not using explicit annotation and cannot be invoked in strict mode' #1976

Closed
Alexander-txj opened this issue Apr 17, 2017 · 1 comment

Comments

@Alexander-txj
Copy link

uis.directive('uiSelectFooter',function(uiSelectConfig){
  return {
    templateUrl: function (tElement) {
      // Needed so the uiSelect can detect the transcluded content
      tElement.addClass('ui-select-footer');

      // Gets theme attribute from parent (ui-select)
      var theme = tElement.parent().attr('theme') || uiSelectConfig.theme;
      return theme + '/footer.tpl.html';
    },
    restrict: 'EA',
    transclude: true,
    replace: true
  };
});

uis.directive('uiSelectHeader',function(uiSelectConfig){
  return {
    templateUrl: function (tElement) {
      // Needed so the uiSelect can detect the transcluded content
      tElement.addClass('ui-select-header');

      // Gets theme attribute from parent (ui-select)
      var theme = tElement.parent().attr('theme') || uiSelectConfig.theme;
      return theme + '/header.tpl.html';
    },
    restrict: 'EA',
    transclude: true,
    replace: true
  };
});

it should be:

uis.directive('uiSelectFooter', ['uiSelectConfig',function(uiSelectConfig){
  return {
    templateUrl: function (tElement) {
      // Needed so the uiSelect can detect the transcluded content
      tElement.addClass('ui-select-footer');

      // Gets theme attribute from parent (ui-select)
      var theme = tElement.parent().attr('theme') || uiSelectConfig.theme;
      return theme + '/footer.tpl.html';
    },
    restrict: 'EA',
    transclude: true,
    replace: true
  };
}]);

uis.directive('uiSelectHeader',['uiSelectConfig',function(uiSelectConfig){
  return {
    templateUrl: function (tElement) {
      // Needed so the uiSelect can detect the transcluded content
      tElement.addClass('ui-select-header');

      // Gets theme attribute from parent (ui-select)
      var theme = tElement.parent().attr('theme') || uiSelectConfig.theme;
      return theme + '/header.tpl.html';
    },
    restrict: 'EA',
    transclude: true,
    replace: true
  };
}]);

Bug description:

Link to minimally-working plunker that reproduces the issue:

Version of Angular, UI-Select, and Bootstrap/Select2/Selectize CSS

Angular:

UI-Select:

Bootstrap/Select2/Selectize CSS (if applicable):

@Jefiozie
Copy link
Contributor

Hi,

Thanks this is already addressed in the issue: #1971

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants