Introduction to Angular.js in 50 Examples (part 1)
Why Stack Overflow recommends it
Stack Overflow users link it as a beginner-friendly, example-driven tutorial when answering newcomers' AngularJS questions about routing, bindings and getting started.
Recommended by 8 people across 7 different months, 2014 to 2017.
What it is
A recorded university lecture by Curran Kelleher at UMass Lowell introducing Angular.js through 36 worked examples, covering single-page app concepts, related libraries and core Angular features. Code is published on GitHub and part 2 covers the remaining examples.
What people said
Strong rec isherwood · 2016-09 · Stack Overflow · on “AngularJS dynamic routing from index to detailed page”
You should use a variable in your router: .whenAuthenticated('/events/:id', { templateUrl: 'views/eventShow.html', controller: 'eventShowCtrl' }) Then you can simply use the ID in your function call: go('events/:id') Here's a great tutorial [this video] (and I highly recommend watching all of both parts). And you'll have nicer URLs that can be bookmarked.
Strong rec Phil Poore · 2017-01 · Stack Overflow · on “How to split a string in Angular.js?”
Should be like this: <div class="container" ng-controller="LunchCheckController"> <h1>Lunch Checker</h1> <div class="form-group" > <input id="lunch-menu" type="text" placeholder="list comma separated dishes you usually have for lunch" class="form-control" ng-model="input"> </div> <div class="form-group"> <button class="btn btn-default" ng-click="stack()"> Check If Too Much </button> </div> <div class="form-group message" id="result"> <!-- Your message can go here. --> {{message}} </div> </div> JavaScript (function() { 'use strict'; angular.module('LunchCheck', []) .controller('LunchCheckController', LunchCheckController); LunchCheckController.$inject = ['$scope']; function LunchCheckControll
Recommends Michail Michailidis · 2014-10 · Stack Overflow · on “How to convert jQuery code into usable AngularJS code”
JQuery approach is completely incompatible with AngularJS. DOM Manipulation is only allowed in directives in the link function otherwise it is a very bad practice. Try to start from scratch and forget about JQuery. The magic of AngularJS happens with 2-way bindings. You could use a directive, with a login controller and a factory/service to hold the username and password and send it to the database. For this login there is definitely no need for JQuery at all. You can check this question here: AngularJS- Login and Authentication in each route and controller [LINK] edit: In your question above, it is not a directive instead of a controller. A directive can have a controller that is applied to
Recommends Michail Michailidis · 2014-10 · Stack Overflow · on “Do I need to convert JSP to C# to work with AngularJS and display server side data?”
If you can return/echo json files from JSP and you can consume requests (get,post,update delete) coming to it and redirect it to whatever handles the business logic (e.g controllers) then you are set to go. I believe with JSP you mean JSP + Java Servlets + Java Beans. Or in other words controllers better be Java classes. If that is your case, then you definitely can do that without converting to C# + ASP.NET ;) Update: The fact that you are only using JSP is good for starters but as you get better and want the application to scale more you need to move talking with the database in a Java class/servlet. JSP should be used only for presentation/templating and no business logic (if/else this th
Recommends KN_ · 2014-11 · Stack Overflow · on “Pass id from home page in edit page”
a few questions if you don't mind; are you under the same controller? Can we see the full code of your app? There are a few ways to send parameters from one view to another, I'll give you a few links that helped me: Angular in 50 examples. On the second part, you can find the whole logic for doing this: [this video] [LINK] AngularJs Documentation. Here you have a simple example of how to apply routing and parameters: [LINK] I hope this helps you. Regards!
Recommends joakimk · 2015-07 · Stack Overflow · on “How does AngularJS do what it does (what makes it tick)”
I'm looking at AngularJS, trying to learn the basics. Quite experienced with JavaScript and server programming, HTTP etc, so I do have an understanding of what it does. I'm watching Curran Keller's "50 examples" tutorial on YouTube (link below), and I've found lots of documentation on what Angular does... but not so much on how it does it. Knowing the rough on how Angular is able to do all these neat things -- it being "only" a JavaScript wrapper, executing in the web browser -- would be helpful when I am to write my first Angular "app" (webpage with metadata-enhanced JS, as I currently think of it). ;-) that ought to get the discussion going! So, here's what I think I've gleaned so far: Ang
Recommends Gajotres · 2015-07 · Stack Overflow · on “How to use autocomplete with onsen-ui?”
Trust me it's not that complicated. First you don't need jQuery for this. jQuery Mobile can't even work with OnsenUI. Take a look at this link: [LINK] Disclosure it's my personal blog post. You will find an easy working example showing you how to use Master-Detail pattern with OnsenUI. You should be interested in the first part of that article. In it, I'm using a remote API to collect remote data and show them inside a list component. Fundamentally, anything you write into a search box will return as a filtered result set. P.S. You can't use jQuery Mobile with OnsenUI, both of them are mobile UI frameworks. Never mix them together, there's no point. While OnsenUI supports jQuery try using it
Recommends Pixelomo · 2015-12 · Stack Overflow · on “scroll to searched word from top to bottom with button click”
I'd recommend checking out this intro to angular, using it you can create (amongst many other things) search boxes that search through content and return results on keydown without need to click a button [this video]
Recommends ArrowKneeous · 2016-10 · Stack Overflow · on “update angular form from javascript”
You can update the value on an html form using angularjs like so: angular.module('HelloWorldApp', []) .controller('HelloWorldController', function($scope) { $scope.greeting = "Hello World"; $scope.UpdateForm = function(){ $scope.greeting= "Updated!"; } }); <script src=" [LINK] "></script> <html> <div ng-app="HelloWorldApp"> <div ng-controller="HelloWorldController"> <input ng-model="greeting" /> <button ng-click="UpdateForm()">Update Form</button> </div> </div> </html> To get started with angular, I really enjoyed watching this video Angular in 50 examples part 1 [this video]
Cites Craig O. Curtis · 2015-05 · Stack Overflow · on “Push / append Angular array data into an HTML element?”
var nameApp = angular.module('nameApp', []); nameApp.controller('NameCtrl', function($scope){ $scope.names = ['do the laundry','buy bananas','do the dishes','mow the lawn']; $scope.addName = function() { // also need to get new date and time stamp it on item $scope.date = new Date(); $scope.names.unshift($scope.enteredName); $scope.enteredName = ""; }; $scope.removeName = function(name){ var i = $scope.names.indexOf(name); $scope.names.splice(i, 1); // array.splice(start, deleteCount[, item1[, item2[, ...]]]) // How do I push onto the ul $scope.removed.push(name); }; }); </script> This is from the Introduction to Angular JS in 50 Examples Part 1 video on Youtube at Introduction to Angular JS