Join Joseph Labrecque for an in-depth discussion in this video Setting up the AngularJS controller, part of Building Custom HTML5 Video Playback with AngularJS 1.
- Controllers in AngularJS…is where the bulk of our DOM behavior…and interaction occurs.…Nearly all of our application code…will reside within the controller.…Let's create a controller for our application…and bind it to the DOM.…So, the first thing I'll do…inside of our video-app.js file…is paste in a little snippet…which creates a controller for us…on the video app.…So, to do that, we just reference video app,…which we've already controlled up here…as an Angular application.…Then we say .controller,…and then we pass in the name that we want to assign…to this controller.…
I'm going to call this VideoController,…and then we have to pass in…anything we want to use inside of here.…So we want to use the scope module…in our controller.…This is how we bind different properties…and variables and functions and things…to our controller scope.…We can bind those through the DOM as well.…So to do that, we declare $scope,…and then we say function, passing in scope,…and then we open up our curly braces…in order to write our controller code.…
- Setting up
- Creating a video element
- Making the video element responsive
- Building controls
- Setting up an AngularJS controller
- Binding properties
- Customizing the playback controls and time display
- Enabling full-screen playback and playlist support
- Using AngularJS directives and filters
Skill Level Intermediate
Building a Mobile App with AngularJS 1 and Ionicwith Ray Villalobos3h 31m Intermediate
1. Setting Up the Project
2. HTML Video Playback
3. AngularJS Integration
4. Playback Customization with AngularJS
5. Advanced Features
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.