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

Using Tabs throws syntax error in 1.2.16 (but not 1.2.15) #2106

Closed
aslate opened this issue Apr 24, 2014 · 3 comments
Closed

Using Tabs throws syntax error in 1.2.16 (but not 1.2.15) #2106

aslate opened this issue Apr 24, 2014 · 3 comments

Comments

@aslate
Copy link

aslate commented Apr 24, 2014

I'm upgrading my application to bootstrap 0.10.0 and Angular 1.2.16 and have found that the tabset control, it throws an error during compilation - downgrading to 1.2.15 resolves this.

The following code seems to cause the issue -

tabset
    tab(heading="Testing")
        my-custom-directive()
Error: Syntax error, unrecognized expression: <div class="tabbable">
  <ul class="nav {{type && 'nav-' + type}}" ng-class="{'nav-stacked': vertical, 'nav-justified': justified}" ng-transclude></ul>
  <div class="tab-content">
    <div class="tab-pane" 
         ng-repeat="tab in tabs" 
         ng-class="{active: tab.active}"
         tab-content-transclude="tab">
    </div>
  </div>
</div>
    at Function.Sizzle.error (http://localhost:3000/js/lib/jquery/jquery-1.9.1.js:4421:8)
    at tokenize (http://localhost:3000/js/lib/jquery/jquery-1.9.1.js:5076:11)
    at select (http://localhost:3000/js/lib/jquery/jquery-1.9.1.js:5460:11)
    at Function.Sizzle (http://localhost:3000/js/lib/jquery/jquery-1.9.1.js:3998:9)
    at jQuery.fn.extend.find (http://localhost:3000/js/lib/jquery/jquery-1.9.1.js:5576:11)
    at jQuery.fn.jQuery.init (http://localhost:3000/js/lib/jquery/jquery-1.9.1.js:196:38)
    at jQuery (http://localhost:3000/js/lib/jquery/jquery-1.9.1.js:62:10)
    at http://localhost:3000/js/bundle.js:20668:27
    at http://localhost:3000/js/bundle.js:21895:11
    at deferred.promise.then.wrappedCallback (http://localhost:3000/js/bundle.js:25268:81) 
@henpatel
Copy link

It seems this had to do with Jquery-1.9.1. I ran into the same issue when i updated my jquery version from 1.9.0 to 1.9.1. I updated my version to 2.1.0 and issue went away. Not sure if this helps anyways but I didn't have to change Angular Version. I am using angular 1.2.16.

@nfroidure
Copy link

Having the same issue here with jQuery 1.9.1. Have someone found a workaround without upgrading JQuery ?

Edit: Updating to JQuery 1.11.1 also solved the issue.

@JeremyWeir
Copy link
Contributor

The issue is the tabset template starts with whitespace. Remove the leading \n in the template string:
a.put("template/tabs/tabset.html",'\n<div>\n <ul cla...
->
a.put("template/tabs/tabset.html",'<div>\n <ul cla...

http://bugs.jquery.com/ticket/13223

OronNadiv pushed a commit to lanetix/bootstrap that referenced this issue Nov 18, 2014
This messes up jquery's parsing of the template

Closes angular-ui#2200
Fixes angular-ui#2106
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

4 participants