Hi,
 
             I would like to use Resig's method to use OO like this.
 
var User = Class.extend({
 
  init: function(firstName,lastName){
 
    this.firstName = firstName;
    this.lastName = lastName;
 
  },
 
  getFirstName: function(){
 
    return this.firstName;
 
  },
  getLastName: function(){
 
    return this.firstName;
 
  }
 
});
 
There are two questions.
Q1 :
How is the 'Class' framework code recognized by Angular ? 
 
Q2:
When I code a jasmine test like this
 
describe("User's First Name", function() {
    it("firstName", function() {
        expect(new 
User("firstName","lastName").getFirstName()).toEqual("firstName");
    });
});
 
I get 'Uncaught ReferenceError: Class is not defined'
 
So I think I haven't understood how to make angular recognize the 'Class' 
framework code. I am trying to build a domain model.
 
 
 
Thanks,
Mohan

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to