jensengar
jensengar

Reputation: 6167

Adding jquery breaks ionic

Not sure why, but when I add jQuery to my app, ionic breaks. Is ionic version dependent? All I did was bower install jQuery --save then added the script reference to my index.html. I get the following error when running the app:

Error: [$compile:ctreq] Controller 'ionTabs', required by directive 'ionTabNav', can't be found!
http://errors.angularjs.org/1.2.22/$compile/ctreq?p0=ionTabs&p1=ionTabNav
    at http://0.0.0.0:9000/bower_components/angular/angular.js:78:12
    at getControllers (http://0.0.0.0:9000/bower_components/angular/angular.js:6524:19)
    at http://0.0.0.0:9000/bower_components/angular/angular.js:6532:24
    at forEach (http://0.0.0.0:9000/bower_components/angular/angular.js:325:18)
    at getControllers (http://0.0.0.0:9000/bower_components/angular/angular.js:6531:11)
    at nodeLinkFn (http://0.0.0.0:9000/bower_components/angular/angular.js:6693:35)
    at compositeLinkFn (http://0.0.0.0:9000/bower_components/angular/angular.js:6086:13)
    at publicLinkFn (http://0.0.0.0:9000/bower_components/angular/angular.js:5982:30)
    at link (http://0.0.0.0:9000/bower_components/ionic/release/js/ionic-angular.js:7563:61)
    at nodeLinkFn (http://0.0.0.0:9000/bower_components/angular/angular.js:6692:13) <a ng-class="{'tab-item-active': isTabActive(), 'has-badge':badge, 'tab-hidden':isHidden()}" class="tab-item" title="Family Communication" icon="icon ion-android-social"> 

Upvotes: 1

Views: 2632

Answers (1)

I_Debug_Everything
I_Debug_Everything

Reputation: 3816

Since bower install installs the latest version of jQuery, this will break dependency since it is breaking things as described here

Try downgrading the jQuery version to v1.9.1

Upvotes: 4

Related Questions