Skip to content

Instantly share code, notes, and snippets.

@mhwinkler
Created January 14, 2015 08:31
Show Gist options
  • Select an option

  • Save mhwinkler/54e7eb7c115ebbfab9a8 to your computer and use it in GitHub Desktop.

Select an option

Save mhwinkler/54e7eb7c115ebbfab9a8 to your computer and use it in GitHub Desktop.
m.BaseDirective = class mBaseDirective
templateUrlPrefix: '/* @echo applicationConfig_defaultScheme */' +
'/* @echo applicationConfig_staticFileDomain */' + '/' +
'/* @echo applicationConfig_staticFileDirectory */' + '/' +
'/* @echo templatesDir */' + '/'
constructor: ->
if @templateUrl? and @templateUrlPrefix
@templateUrl = @templateUrlPrefix + @templateUrl
# if @scope?
# @scope = @scope
m.Directive = class mDirective extends mBaseDirective
class phoneItem extends m.Directive
restrict : 'E'
templateUrl : 'components/phone/phone-item.html'
scope :
name : '@'
description : '@'
href : '@'
imgSrc : '@'
angular.module('components.phone').directive 'phoneItem', -> newPhoneItem = new phoneItem()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment