Questions:

The angluar tips page shows this code...

var app = angular.module('beta', [], function($routeProvider, $locationProvider) {
  ...

Does this imply that a "module" is an angular application?  

The docs say you can have more then one app per page.  Do all the routers then get called with the GET url?

Am i correct that app.factory('foo",...)  sets it so that a controller definition can be of the form func(foo) and will get

a copy of the foo service in foo?

If services are bound to modules, how can multiple module share a common service?

Router confusion:  its looks like $routeProvider maps a URL to a template and a controller.  But I expct URL routing to happen server side,  What does this client side routing do and why?  Is this so you can reuse the same view with different controllers?  If so, how do you reference the controller in the view? Do all the differinf controller instances have to be in different files with the same controller name?


Directives are tied to their definition through a regex that does string replacement.

foo-bar  becomes fooBar

data-foo-bar becomes fooBar as well, the data- is really a directive telling the system to make the html html validator compliant (what does this imply?)

x- is a synonym for data-

There are some other special characters whose meaning I dont understand yet  (: _)

The directive declaration method actually ties a factory method to the directive.  This factory method returns an object that contains instructions to the

compiler that actually define the directive itself.


Errors thrown by canjs Contacts exampel to look into:

not well-formed views/contactsList.ejs:3
junk after document element views/contactView.ejs:2
not well-formedviews/contactsList.ejs:3

junk after document elementviews/contactView.ejs:2

  • No labels

1 Comment

  1. Unknown User (jeffpk@mit.edu)


    Errors generated by Canjs Contacts example to look into:

    not well-formed views/contactsList.ejs:3
    junk after document element views/contactView.ejs:2
    not well-formedviews/contactsList.ejs:3

    junk after document elementviews/contactView.ejs:2