Dynamically Display Data with AngularJS Controllers

InstructorLukas Ruebbelke

Share this video with your friends

Send Tweet

We are going to take the static HTML elements and dynamically display them on the page by setting up an AngularJS controller and hooking it up with AngularJS templating in the view.

The code for this lesson can be found on Github. Note: the tag name corresponds to the lesson.

Eric
~ 6 years ago

I was trying this example, and I was not able to get the bookmark list to appear. I only see bookmark items when I hit a category.

I narrowed it down to the filter being added to ng-repat="bookmark in bookmarks | filter: {category: currentCategory.name}".

This is the js files I am using for angular:

//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js" //netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js" //cdnjs.cloudflare.com/ajax/libs/lodash.js/2.4.1/lodash.min.js" //ajax.googleapis.com/ajax/libs/angularjs/1.3.14/angular.min.js"

John
~ 5 years ago

Why was there no extended discussion about or explanation of $scope? That's very, very important in Angular.

Joe Turbin
~ 5 years ago

Great video. Easy to follow for a beginner. Thanks!

Raul
~ 5 years ago

I have seen this in various tutorials: What is the reason behind putting the <script> tags at the end of the body section instead of puting them in the head section?

Joel Hooks
~ 5 years ago

I have seen this in various tutorials: What is the reason behind putting the <script> tags at the end of the body section instead of puting them in the head section?

The browser loads everything in head first and blocks the page. People put scripts in body to allow the body text to render and give a better user loading experience.

Raul
~ 5 years ago

Good to know. Thanks Joel!

Raul
~ 5 years ago

I thought about this for a bit and I do believe it is better to import angular on top in angular apps since if the page loads without angular you will see a lot of {{expresion}} statements there. Please tell me if i'm wrong.

~ 5 years ago

Please remember to add https: before URL calls. People don't run your code on a server, they tend to use it locally.

Dler
~ 5 years ago

Refering to video Building an Angular App: Filters by Lukas Ruebbelke. My question is, if I create a bookmark and then refresh the page in my website, will the created bookmark get deleted because of refreshing the page? That is something I have been wondering about for a long time..

Nabil Makhout
~ 4 years ago

This helped me big times! Even though I am running on a local server with npm http-server it didn't work. Thanks for pointing this out!

Michael Friedman
~ 4 years ago

use script defer in the head