<commit_before># //= require ./angular_model
class @AngularScopedModel extends AngularModel
  @inject: (args...) ->
    args.push('$scope','$rootScope','$routeParams','$controller')
    @$inject = args
  @extendController: (args...) ->
    @$extendedControllers = args
  constructor: (args...) ->
    # Bind injected dependencies on scope ie @$scope
    for key, index in @constructor.$inject || []
      @[key] = args[index]
    # extend controllers
    for name in @constructor.$extendedControllers || []
      angular.extend @, @$controller name, {$scope: @$scope}<commit_msg>allow extending controller to overwrite other options<commit_after># //= require ./angular_model
class @AngularScopedModel extends AngularModel
  @inject: (args...) ->
    args.push('$scope','$rootScope','$routeParams','$controller')
    @$inject = args
  @extendController:  ->
    @$extendedControllers = [].slice.call(arguments,0)
  constructor: (args...) ->
    # Bind injected dependencies on scope ie @$scope
    for key, index in @constructor.$inject || []
      @[key] = args[index]
    # extend controllers
    for controller in @constructor.$extendedControllers || []
      name = controller.name || controller
      opts = {$scope: @$scope}
      opts[key] = @[val] for key,val of controller.scope || {}
      angular.extend @, @$controller name, opts
{'fraction_non_alphanumeric': 0.15883668903803133, 'fraction_numerical': 0.0007457121551081282, 'mean_word_length': 3.6759581881533103, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7320541', 'n_tokens_mistral': 388, 'n_tokens_neox': 379, 'n_words': 101}