Skip to content

Element.bind is not function (while using ui-sref) #2743

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
mehowp opened this issue May 13, 2016 · 5 comments
Closed

Element.bind is not function (while using ui-sref) #2743

mehowp opened this issue May 13, 2016 · 5 comments

Comments

@mehowp
Copy link

mehowp commented May 13, 2016

Hello.

I'm using angular 1.5.5 and newest ui-router (0.2.18). I have successfuly configured my angularjs app, states works fine but problem occurs when I'm trying to use ui-sref directive:

Error: element.bind is not a function
$StateRefDirective/<.link@http://localhost/iw/wp-content/themes/bbstudio-michal/resources/includes/js/angular.js:8499:7
invokeLinkFn@http://localhost/iw/wp-content/themes/bbstudio-michal/resources/includes/js/angular.js:18486:9
nodeLinkFn@http://localhost/iw/wp-content/themes/bbstudio-michal/resources/includes/js/angular.js:17885:11
compositeLinkFn@http://localhost/iw/wp-content/themes/bbstudio-michal/resources/includes/js/angular.js:17189:13
compositeLinkFn@http://localhost/iw/wp-content/themes/bbstudio-michal/resources/includes/js/angular.js:17192:13
compositeLinkFn@http://localhost/iw/wp-content/themes/bbstudio-michal/resources/includes/js/angular.js:17192:13
compositeLinkFn@http://localhost/iw/wp-content/themes/bbstudio-michal/resources/includes/js/angular.js:17192:13
publicLinkFn@http://localhost/iw/wp-content/themes/bbstudio-michal/resources/includes/js/angular.js:17069:30
browserifyShim/</ngIncludeFillContentDirective</<.link@http://localhost/iw/wp-content/themes/bbstudio-michal/resources/includes/js/angular.js:34659:9
invokeLinkFn@http://localhost/iw/wp-content/themes/bbstudio-michal/resources/includes/js/angular.js:18486:9
nodeLinkFn@http://localhost/iw/wp-content/themes/bbstudio-michal/resources/includes/js/angular.js:17885:11
compositeLinkFn@http://localhost/iw/wp-content/themes/bbstudio-michal/resources/includes/js/angular.js:17189:13
publicLinkFn@http://localhost/iw/wp-content/themes/bbstudio-michal/resources/includes/js/angular.js:17069:30
lazyCompilation@http://localhost/iw/wp-content/themes/bbstudio-michal/resources/includes/js/angular.js:17407:16
boundTranscludeFn@http://localhost/iw/wp-content/themes/bbstudio-michal/resources/includes/js/angular.js:17206:16
controllersBoundTransclude@http://localhost/iw/wp-content/themes/bbstudio-michal/resources/includes/js/angular.js:17935:20
ngIncludeWatchAction/<@http://localhost/iw/wp-content/themes/bbstudio-michal/resources/includes/js/angular.js:34605:27
processQueue@http://localhost/iw/wp-content/themes/bbstudio-michal/resources/includes/js/angular.js:24753:28
scheduleProcessQueue/<@http://localhost/iw/wp-content/themes/bbstudio-michal/resources/includes/js/angular.js:24769:27
$RootScopeProvider/this.$get</Scope.prototype.$eval@http://localhost/iw/wp-content/themes/bbstudio-michal/resources/includes/js/angular.js:26021:16
$RootScopeProvider/this.$get</Scope.prototype.$digest@http://localhost/iw/wp-content/themes/bbstudio-michal/resources/includes/js/angular.js:25837:15
$RootScopeProvider/this.$get</Scope.prototype.$apply@http://localhost/iw/wp-content/themes/bbstudio-michal/resources/includes/js/angular.js:26129:13
done@http://localhost/iw/wp-content/themes/bbstudio-michal/resources/includes/js/angular.js:20364:36
completeRequest@http://localhost/iw/wp-content/themes/bbstudio-michal/resources/includes/js/angular.js:20570:7
requestLoaded@http://localhost/iw/wp-content/themes/bbstudio-michal/resources/includes/js/angular.js:20503:9

<a class="navbar-brand" ui-sref="header">

Does anyone know why this happen and how to fix it?

@christopherthielen
Copy link
Contributor

christopherthielen commented May 18, 2016

I haven't seen this occur. Are you able to reproduce this in a plunk? http://plnkr.co/edit/UImEXBx5jpiG0TBrRhmi?p=preview What browsers is this happening in?

your ui-sref looks like <a class="navbar-brand" ui-sref="header">? That seems fine.

@eddiemonge
Copy link
Contributor

Closing due to inactivity

@oznu
Copy link

oznu commented Aug 8, 2016

I experienced the same issue. The root cause for me was the jQuery library I had included. I swapped from jquery.slim.js back to jquery.js and the errors went away.

@Masireddy
Copy link

I faced the same issue and it got resolved by removing jqery.slim.js from my index.html page

@sbaechler
Copy link

Duplicate of #3035
Resolved in #3036

Released in 0.3.2

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

No branches or pull requests

6 participants