Sha256: 8f4ad4a1c54cadecb21e76a4183991071b1980716e37c5ba2c55ae4d96e9c065

Contents?: true

Size: 851 Bytes

Versions: 9

Compression:

Stored size: 851 Bytes

Contents

# //= require super_classes/angular_model
class @AngularCompileModel extends AngularModel
  @register: (model,type) -> model::[type || 'compile'] = (args...) => new @(args...)
  @$default_arguments: ['element','attrs','transcludeFn']
  constructor: (args...) ->
    for key,index in @constructor.$default_arguments
      @['$' + key] = args[index]
    @$injector = angular.element(document.body).injector()
    for key in @constructor.$inject || []
      @[key] = @$injector.get(key)
    @initialize?()
###
class CompileModel extends AngularLinkModel
  @inject('Project')
  initialize: ->
    console.dir 'howdy'
    console.dir @$scope
    console.dir @Project
  @register(testDirective)      #NOTE: Must be called last in directive since it instantiates a new model instance
###                             #NOTE: argument should be directive model

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
material_raingular-0.2.8.6 lib/assets/javascripts/super_classes/angular_compile_model.coffee
material_raingular-0.2.8.5 lib/assets/javascripts/super_classes/angular_compile_model.coffee
material_raingular-0.2.8 lib/assets/javascripts/super_classes/angular_compile_model.coffee
material_raingular-0.2.7 lib/assets/javascripts/super_classes/angular_compile_model.coffee
material_raingular-0.2.6.3 lib/assets/javascripts/super_classes/angular_compile_model.coffee
material_raingular-0.2.6.2 lib/assets/javascripts/super_classes/angular_compile_model.coffee
material_raingular-0.2.6.1 lib/assets/javascripts/super_classes/angular_compile_model.coffee
material_raingular-0.2.6 lib/assets/javascripts/super_classes/angular_compile_model.coffee
material_raingular-0.2.5 lib/assets/javascripts/super_classes/angular_compile_model.coffee