mgcrea / angular-strap

AngularJS 1.2+ native directives for Bootstrap 3.
mgcrea.github.io/angular-strap
MIT License
5.73k stars 1.38k forks source link

Tabs does not work with Angular js 1.5.8 #2258

Closed amitdangwal closed 5 years ago

amitdangwal commented 7 years ago

I see a bug in angular-strap latest version 2.3.12 as the tabs are not visible. Angular js 1.5.8

my index.html

    <div  template="Scripts/tpl/optionTab.tpl.html" ng-model="optionsTabs.activeTab" bs-tabs="optionsTabs">

I have tried all the options(changed attribute to nav-tabs, added bsActivePane, etc in above code but still none of the tab in page appeared)

To make it working I have to add a fix(not a fix but a rollback of tabs in "angular-strap.js" to a older version). Once I replaced the Tab code in "angular-strap.js" with old version of angular-strap (2.3) then it started to work. Can you please have a look as what is wrong in the "angular-strap.js" as it is not supporting angular 1.5.8 ?

When will be next version will be available of angular-strap which will support angular 1.6.6?

Here below is the code I added(removed the TAB code) angular.module("mgcrea.ngStrap.tab", []).run(["$templateCache", function(a) { a.put("$pane", "{{pane.content}}") }]).provider("$tab", function() { var a = this.defaults = { animation: "am-fade", template: "tab/optionTab.tpl.html" }; this.$get = function() { return { defaults: a } } }).directive("bsTabs", ["$window", "$animate", "$tab", function(a, b, c) { var d = c.defaults; return { restrict: "EAC", scope: !0, require: "?ngModel", templateUrl: function(a, b) { return b.template || d.template }, link: function(a, b, c, e) { var f = d; angular.forEach(["animation"], function(a) { angular.isDefined(c[a]) && (f[a] = c[a]) }), c.bsTabs && a.$watch(c.bsTabs, function(b) { a.panes = b }, !0), b.addClass("tabs"), f.animation && b.addClass(f.animation), a.active = a.activePane = 0, a.setActive = function(b) { a.active = b, e && e.$setViewValue(b) }, e && (e.$render = function() { a.active = 1 * e.$modelValue }) } } }]);

stale[bot] commented 5 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

lock[bot] commented 5 years ago

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.