I was trying angularjs with Coffescript class
I was able to inject and able to do a successful example using coffeescript. But to access $scope I have to write functions within the constructor. What I can do to get it out of it. If there is another good way to write that please let me know.
Here is my working coffeescript code
class PersonCtrl
@$inject = ['$scope']
constructor: (@scope) ->
@scope.persons = [
firstName:"Kunjan"
lastName:"Dalal"
,
firstName:"Kunj"
lastName:"Dalal"
]
@scope.addPerson = () =>
@scope.persons.push angular.copy @scope.person
Please let me know if any further details required.