I did that but then later just included two lines because all the 
requirements are in mainConfig.js. I think if the application uses 
requirejs properly then the karma ordering problems are solved.

      'vendor/requirejs/require.js',
      'js/mainConfig.js',


Thanks.

On Tuesday, 30 December 2014 05:52:40 UTC+5:30, André Werlang wrote:
>
> If Class is contained inside a library file (.js), make sure that file is 
> referenced in main .html. If running test on karma, make sure that .js is 
> included in karma.conf
>
> Em segunda-feira, 29 de dezembro de 2014 11h53min12s UTC-2, Mohan 
> Radhakrishnan escreveu:
>>
>> 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