Skip to content

chrisbaptiste83/angular-controllers-lab-g-416

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Refactor to use controllerAs

Objectives

  • Update your Controller to use this
  • Update ng-controller to use controllerAs syntax
  • Update binding references

Instructions

Take the code from this repo. If you load index.html, you'll notice how it isn't displaying the correct information.

Using the knowledge from the last lesson, update all the $scope values to use this instead.

In our HTML, update ng-controller to initiate the controller into a variable instead - name this whatever you'd like, however it keeps it clean if we name it the same as our controller.

Update all of our references to $scope in the HTML to reference our new controller instance instead.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 78.0%
  • HTML 22.0%