controller undefined error while working with custom directives - angularjs

I am getting the following error when I am trying to run tabs application and is not working. Please find the plunker. Can any one help me to make it work?
Error: enTabsController is undefined
I am using the code from https://github.com/nervgh/angular-tabs with few modifications but some how it is not working.

Your html is wrong.
The end of '' is at a wrong place.
Correct this and then put: require: '^enTabs' in your directives enTabPane and enTab.
<en-tabs data-container="myContainName">
<en-tab data-pane="myPaneName1" >Tab #1</en-tab>
<en-tab data-pane="myPaneName2">Tab #2</en-tab>
<en-tab data-pane="myPaneName3">Tab #3</en-tab>
<en-tab-pane data-name="myPaneName1">
...
</en-tab-pane>
</en-tabs>
See the plunker : http://plnkr.co/edit/sX3kzw?p=preview

Related

"Can't read property call of undefined" error on JSBin?

I am trying to learn React using JSBin. I have simple example code BookList and BookInfo (renders items inside BookList).
http://jsbin.com/hoyeroz/2/edit?js,output
I am getting below error in the console:
Uncaught TypeError: Cannot read property 'call' of undefined
Is this a JSBin bug or am I declaring the React components incorrectly?
Your code is proper, and working also, don't know why it is not working on JSBin, because same code is giving proper output on jsfiddle.
check fiddle: https://jsfiddle.net/03Lm3zbv/
Update: After doing some Google search finally got this:
This is a bug with JSBin, and how it handles transpilation with Babel. If you add the pragma //noprotect to the top of your code it will work.
check the working code on JSBin: http://jsbin.com/gedavinodu/edit?html,js,output
There is no explicit bind call here. So what's not bound? Well, if you put this in your compontentDidMount, you'll see that you get the result you are looking for.
this.setState({ books: [{"body": "body text", "name": "the name"}]});
So the ajax call is failing. This seems suspect: $.ajax. It seems to me that the $ is not bound to the jQuery function you think it is.

Partial included using ng-include has been removed, but my console shows a $compile:tpload Failed to load template error

At first, I used ng-include to include a partial html code, but then I changed my mind and removed it completely from my code. Now, for some reason, I'm getting this error message "Error: [$compile:tpload] Failed to load template: templates/partials/_aboutMe.html". I wonder what's going on and want to get rid of it but I don't know how.
Thanks for your help!
I finally found what was the problem! One of my directives was requesting it. #matmo many thanks.

AngularJS Feedback directive

I'm trying to implement what looks to be a really cool feedback directive but can't seem to even get the button to display...?
I went through the set up as described on the github page but no luck. This code was originally commented out:
`templateUrl: function(element, attributes) {
return attributes.template || "angularsendfeedback.html";
},`
so I just uncommented it... thinking I could just use that as the default HTML to get things going. The default "angularsendfeedback.html" is blank but it seemed like it already had default html in the js file.
Am I missing something or is the directive missing something? Is there another simple AngularJS directive for feedback out there... somewhere? Any recommendations?

marionette example not working

I have all the HTML , JS code here on codepen : http://cdpn.io/nbuGB
I started learning marionette JS. Somehow this simple example is not working.
It throws error :
Uncaught TypeError: undefined is not a function
how to resolve this ?
Your problem is in these lines:
ContactManager.reqres.setHandler("contact:entities",function(){
return API.getContactEntities;
});
You need to write API.getContactEntities() otherwise you're returning a function reference instead of your contacts collection. This causes the undefined error.
See: http://codepen.io/anon/pen/jALtq

Jstree and angularJS using promise

I lost two days trying to solve this problem by myself, but I give up. pleaseee help .
i want to load my tree using jstree and promise AngularJS
but I keep getting this error:
Uncaught Neither data nor ajax settings supplied.
i can see im my html page jsut the pluging loading and no result :(
y'll find in thi link my code .
http://plnkr.co/edit/kDjFCa4x6Ghyb3pwghXc?p=preview
Thank you very much :)
After some playing with your code, I got this: http://plnkr.co/edit/JfTVNdQnaGZV01wyQHtn
changes: third argument of scope.$watch to true, setting "json_data" to
"json_data" :{
"data":scope.jstree.data
}
(looks strange, but it's quirks of jsTree)

Resources