Navigate/Search

Archive for the 'Vocab' Category

Angular JS Question (11)

Thursday, March 26th, 2015

Question:

What is theValue Angular Recipe?

Answer:

.value(name, value);

AngularJS Question (10)

Monday, March 23rd, 2015

Question:

During which phase of the Angular Life Cycle are “Constant” angular providers executed?

Answer:

During the configuration phase.

NOTE: All other providers (Value, Service, Factory, Provider) are executed in the run phase.  Constant is the only provider that is executed in the configuration phase.

AngularJS Question (9)

Friday, March 20th, 2015

Question:

What is the Constant Angular Recipe?

Answer:

.constant(name, value);

AngularJS Question (8)

Tuesday, March 17th, 2015

Question:

What are the five AngularJS Service Recipes?

Answer:

Constant, Value, Factory, Service, Provider

AngularJS Question (7)

Saturday, March 14th, 2015

Question:

How many AngularJS Service Recipes Are There?

Answer:

5

Angular Question (6)

Thursday, February 26th, 2015

Question:

What is $compile?

Answer:

Compiles an HTML string or DOM into a template and produces a template function, which can then be used to link scope and the template together.

Angular Question (5)

Monday, February 23rd, 2015

Question:

What is the difference between an AngularJS Module and an AngularJS Application?

Answer:

A module is a container.  It contains JS code. An AngularJS Web Application is a web application that is generated by the AngularJS compiler.  The AngularJS compiler creates a web application out of a template and JavaScript.  Basically, the ng-app directive contains two things. First the code and second the HTML template.

Angular Question (4)

Friday, February 20th, 2015

Question:

What is the difference between an AngularJS Module and an AngularJS Application?

Answer:

Depends on the context.  From a JS point of view nothing.  From a runtime point of view everything.  More on this point in my next Angular Question post.

Angular Question (3)

Tuesday, February 17th, 2015

Question:

What do these statements do?

var myApp = angular.module("mainApp", []);
var myMod = angular.module("mainApp");

Answer:

This create a mainApp module, returns the mainApp module twice.  It

  • creates the mainApp module in the angular object
  • returns a reference to the mainApp module from the angular object
  • assigns the reference to the mainApp module to a global variable called myApp
  • assigns the reference to the mainApp module to a global variable called myMod

Angular Question (2)

Saturday, February 14th, 2015

A few days ago I asked an angular question.  My next question is more relevant after reviewing the previous question.

 

Question:

What does this statement do?

var myApp = angular.module("mainApp", []);

Answer:

This create a mainApp module and then returns the mainApp module.  It

  • creates the mainApp module in the angular object
  • returns a reference to the mainApp module from the angular object
  • assigns the reference to the mainApp module to a global variable called myApp