Skip to content

bind/bindAll not directly usable with controllerAs syntax / paving the road to angular 2 #323

@reppners

Description

@reppners

I'm moving my code base to use the angular "controllerAs" syntax as much as possible which is somewhat paving the path to angular 2.

I was able to completely remove $scope from most of my controllers by defining them as a class properties (TypeScript, but ES6 supports classes as well) containing my view bindings as properties.

Now I would like to bind the datastore to a property of my class which would lead to only use the $scope as service for setting up the watch and in the html I could bind to a property of my controller as all other properties are when using the "controllerAs"-syntax.

Here some insight on the "controllerAs"-syntax: http://toddmotto.com/digging-into-angulars-controller-as-syntax/

As I see it, we would have to enhance the interface of the js-data-angular bind functions especially the expression-parameter.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions