Skip to content

Commit

Permalink
use bindToController
Browse files Browse the repository at this point in the history
  • Loading branch information
shanzi committed Apr 22, 2015
1 parent 139bdca commit a89c22e
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -6,6 +6,7 @@ class InspectData extends Directive
templateUrl: 'views/inspectdata.html'
controller: '_InspectDataController'
controllerAs: 'inspectdata'
bindToController: true
scope:
data: '='
}
Expand Down Expand Up @@ -38,10 +39,9 @@ class _InspectData extends Controller
value: @processValue(v)

constructor: ($scope) ->
return if not $scope.data
return if not @data

@items = []
@data = $scope.data

if @data instanceof Array
for item in @data
Expand Down

0 comments on commit a89c22e

Please sign in to comment.