error running simple todo app code-AngularJS - angularjs

I am trying to run the following code to generate a simple To Do list app using Angular: https://raw.githubusercontent.com/kumarneetesh24/angular-app/master/mytodoapp.html
But I am getting the following output.
Could any one help me to find out what i am missing .Apart from this the app is not creating new tasks (upon entering and pressing go)

Your angular js file is not getting loaded .
use this script tag :
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.3/angular.min.js"></script>

You First Need to do some re-search and Understand the Concept . Looks
like you copy pasted the code from some where and asking for help .
This type of posts are not acceptable as per stack overflow documentation.
Glad Some of the Guys helped you with out any suggestions which is
Good but at least let them know what they missing .
I provided you plunker :-
learn todo
https://plnkr.co/edit/dA0bSLWm3T7KYctQosO7?p=preview
Understand your self and Update your post How you Figured
Thanks.
.

There is no problem in your code. You must add localhost to the Trusted Sites Zone or publish your code to the target server.

Related

Pl upload library reference

I am working on some POC or code where in I am trying to integrate Pl upload to my react application.
I found very good example -
This one is very good, wrapper for listening all the events from Pl upload library.
https://github.com/lemonCMS/react-plupload
I could integrate it fine, however I noticed linking of Pl upload happened in the index.html file (Which is not ideal way.).
<script type='text/javascript' src='https://cdnjs.cloudflare.com/ajax/libs/plupload/3.1.2/plupload.full.min.js' async></script>
Need some input, how can I link same library coping inside my project directory.
So here basically I am expecting window.plupload should be initialized fine on load.
Another example I really liked is, as this will maintain state in the redux store and I hope I can navigate accross application with upload stays in progress.
https://www.npmjs.com/package/redux-plupload
However for second example as well, need some input about linking.
Also, please suggest if i am missing anything.
Thank you all.
I have figured out, I had to install, below package.
https://www.npmjs.com/package/plupload
This is not latest version, but will solve my purpose.
Thank you!

How can I log the value of the input field to the console whenever it changes

I'm experimenting with the angularjs phonecat tutorial (I'm at step 5) to better understand how angular works. But I fail to manage to log the value of the input field to the console. I tried different approaches, but none of them are working.
How can I access the $ctrl.query variable, and log it whenever it changes? Do I use $watch?
I hope somebody can show me how it is done and maybe explain in detail why and how it is working.
Ok, I seem to have found a solution. I added this to the controller of the phoneList component.
Learning Angular is really not that easy ^^.

I am trying to creating a polling app on the mean stack. I think my routing is messed up but I am not sure

I am trying to create the polling app described in this tutorial here.
I have step 2 finished, and I am about to start step 3(once my application is running properly) which is to incorporate the DB portion. My application is not behaving like the application listed in the tutorial currently though.
I have scanned my code numerous times and debugged it and still cant seem to catch what is throwing it off. When I run the application it runs fine, but none of my partials are being displayed only what is provided in the inital index.html view, so it is simply showing my blank navbar.
I have provided my git repository. If anyone has a moment and can take a look at it. Thank you for your time in advance.
Some of the key things I fixed in my pull request:
You need to include angular-route.js as a separate file now, and have your module depend on ngRoute.
You were missing quotes around the first $routeProvider in the following line:
.config(['$routeProvider',function($routeProvider){
You now need to register controllers using a name (string) with the module, rather than using global functions.
app.controller('ControllerName', function ($scope, ...) { ... });
You also forgot to actually reference a few of the JS files you need in index.html using <script> tags.
There are other small things, but see the PR for the full details. I also changed the way bower components are done.

How to automatically add md5 signature in require('index.js') when using gulp,browserify,angular

everyone, I'm working on my project with gulp, browserify, angular,but I run into a stone wall. I have wrote the code
var indexController = require('./controllers/index.js');
when I modify the controller file "index.js", and rebuild the project, the final javascript in browser is just still not refreshed.
So I search the way how to automatically add md5 signature after the require:
var indexController = require('./controllers/index.js?v=324975934795');
just like when working in html:
<script src="./controllers/index.js?v=324975934795"></script>
Also, I want to find a tool to help me automatically finish it.
I should appreciate it if anyone who suggest me a tool or show me how to automatically do the job.
Thank you for anyone who checking.I have found the solution for my problem in node-static-asset
I should be glad if anyone who show me more nicer solution.

angular js template with routing and translate refusing to work

I am new to angular and it seems very interesting
I am creating a template for a promotional page and struggling to understand what is causing an issue on it - half of the script stopped working...
My fiddle is in here see >
fiddle example
or Plunker
I have working example without route...
Can you advice me how to fix this issue please
First of all, i'd suggest you to separate your project to different files based on best practises
Secondly, 'config, controller, factory' etc are methods of angular.module object. So you need to retrieve it first like
angular.module('<moduleName>').config(...)
or use some variable.
http://plnkr.co/edit/CK5R2cS7Zd9T9Kun9Epc?p=preview

Resources