Click here to Skip to main content
15,921,643 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: Olive Branch to Newbies Pin
W Balboos, GHB14-Feb-18 6:55
W Balboos, GHB14-Feb-18 6:55 
GeneralRe: Olive Branch to Newbies Pin
Mike Hankey14-Feb-18 7:20
mveMike Hankey14-Feb-18 7:20 
GeneralRe: Olive Branch to Newbies Pin
Jörgen Andersson14-Feb-18 9:05
professionalJörgen Andersson14-Feb-18 9:05 
GeneralRe: Olive Branch to Newbies Pin
Ravi Bhavnani14-Feb-18 10:01
professionalRavi Bhavnani14-Feb-18 10:01 
GeneralRe: Olive Branch to Newbies Pin
dlhale14-Feb-18 10:39
dlhale14-Feb-18 10:39 
GeneralRe: Olive Branch to Newbies Pin
Eddy Vluggen14-Feb-18 10:51
professionalEddy Vluggen14-Feb-18 10:51 
QuestionWhat's the deal with Angular Pin
ZurdoDev14-Feb-18 4:31
professionalZurdoDev14-Feb-18 4:31 
AnswerRe: What's the deal with Angular PinPopular
F-ES Sitecore14-Feb-18 5:07
professionalF-ES Sitecore14-Feb-18 5:07 
The idea of such frameworks is that the html is built for you to reflect your data. In traditional ajax if you called a method that returned ajax and you wanted to show that as a table you'd have to make the table tag and inject it into the page somewhere, you would then loop through each item in the json and make a tr tag and inject that into your table. You'd then go through the properties of the json item and create a td tag per property and attach that. Or let's say you have a shopping basket, each row may well comprise quite intricate and complex html as you might have descriptions, image carousels, add\remove buttons, quantity spinners etc and if your basket is ajax enabled you need to create all that html via js.

With angular you effectively "template" your objects\json. So you say that each item in your json array is a tr, each property is a td, and where on the screen your data is shown. Bind your json array and the table appears. Now in code if you add a new item to your array a new row will magically appear in your table. Delete an object and the row disappears, change a property and the cell changes, re-order your objects and your rows also re-order. So you only need to concerns yourself with making sure the data is up-to-date, and angular ensures the html always reflects that data, you don't have to make the html yourself.

For a basket for example if you want to change the quantity you just find the relevant item in your basket array and update the quantity and the screen reflects that change, even updating totals etc if you're clever (or stupid).

This obviously assumes you handle your data state via objects in javascript and use ajax to amend those objects. If your data is all server-side and your handling of data all server-side then there is little point in using these frameworks.
GeneralRe: What's the deal with Angular Pin
ZurdoDev14-Feb-18 5:12
professionalZurdoDev14-Feb-18 5:12 
GeneralRe: What's the deal with Angular Pin
kmoorevs14-Feb-18 6:01
kmoorevs14-Feb-18 6:01 
AnswerRe: What's the deal with Angular Pin
raddevus14-Feb-18 8:15
mvaraddevus14-Feb-18 8:15 
AnswerRe: What's the deal with Angular Pin
virang_2114-Feb-18 14:53
virang_2114-Feb-18 14:53 
GeneralRe: What's the deal with Angular Pin
ZurdoDev14-Feb-18 15:16
professionalZurdoDev14-Feb-18 15:16 
GeneralEver walk past Code Project open on someone elses machine?? Pin
glennPattonWork314-Feb-18 4:22
professionalglennPattonWork314-Feb-18 4:22 
GeneralRe: Ever walk past Code Project open on someone elses machine?? Pin
#realJSOP14-Feb-18 4:27
professional#realJSOP14-Feb-18 4:27 
GeneralRe: Ever walk past Code Project open on someone elses machine?? PinPopular
OriginalGriff14-Feb-18 4:32
mveOriginalGriff14-Feb-18 4:32 
GeneralRe: Ever walk past Code Project open on someone elses machine?? Pin
glennPattonWork314-Feb-18 4:40
professionalglennPattonWork314-Feb-18 4:40 
GeneralRe: Ever walk past Code Project open on someone elses machine?? Pin
Slacker00714-Feb-18 7:19
professionalSlacker00714-Feb-18 7:19 
GeneralRe: Ever walk past Code Project open on someone elses machine?? Pin
raddevus14-Feb-18 8:18
mvaraddevus14-Feb-18 8:18 
GeneralRe: Ever walk past Code Project open on someone elses machine?? Pin
PIEBALDconsult14-Feb-18 4:50
mvePIEBALDconsult14-Feb-18 4:50 
GeneralRe: Ever walk past Code Project open on someone elses machine?? Pin
glennPattonWork314-Feb-18 4:57
professionalglennPattonWork314-Feb-18 4:57 
GeneralRe: Ever walk past Code Project open on someone elses machine?? Pin
Johnny J.14-Feb-18 5:05
professionalJohnny J.14-Feb-18 5:05 
GeneralRe: Ever walk past Code Project open on someone elses machine?? Pin
User 991608014-Feb-18 5:15
professionalUser 991608014-Feb-18 5:15 
GeneralRe: Ever walk past Code Project open on someone elses machine?? Pin
Marc Clifton14-Feb-18 5:32
mvaMarc Clifton14-Feb-18 5:32 
GeneralRe: Ever walk past Code Project open on someone elses machine?? Pin
raddevus14-Feb-18 8:23
mvaraddevus14-Feb-18 8:23 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.