prep for interview Flashcards
root scope
every ang js app has a root scope
all the child scopes inherit fom the root scope
Each view has its own $scope (which is a child of the root scope), so whatever variables one view controller sets on its $scope variable, those variables are invisible to other controllers.
$inject
can be used to inject dependencies
module config block vs module run block
ngChange
do something when an input value changes
nghref
used for adding links
inline templates vs external templates vs internal templates
services vs factories vs providers
both of them are used to share data across controllers
the syntax is however different for both
Substitutable objects that can be wired together using DI.
· Use services to share code and data across the app.
· Angular Services are lazily initialized (initiates only when its needed)
· Angular Services are singletons per Angular module.
· Angular has many in-built services (starting with $) e.g. $rootScope, $http, $routeProviders etc.
$window
Reference to native window object.
$window.alert(“vhjbvkh”);
$location
$document
jQuery/jqLite wrapper for window.document
$document[0].title
$timeout
$interval
$templateCache
$http.post vs jquery.post
what is routing?