3 ms·
Everyone is telling you ways to get around this, but IMO, if you aren't using Angular templates, then you really aren't using Angular. ng-repeat, and other pow
by chaddeshon 13y ago
Everyone is telling you ways to get around this, but IMO, if you aren't using Angular templates, then you really aren't using Angular.
ng-repeat, and other powerful directives are what's great about Angular. Instead of writing code to loop through something, you declare that it should be repeated. Templates are much easier to read this way.
Directives change you way you view your markup. Instead of writing a script that generates the markup you want, you are using a new, more powerful markup language that knows about repeated elements (among other things).
And when the data changes, the webpage just updates, with no thought required by you. Recently, I have started using Firebase, which makes this even more powerful (any realtime updating database library would do the same). I just have to say where in Firebase I want to fetch the data from, and where that data goes in the template. From then on, my webpage stays up to date as the data in the database changes (regardless of who changes it).