Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

controller as should capture this in another variable (often vm) #2

Open
tgaff opened this issue Feb 3, 2016 · 1 comment
Open

Comments

@tgaff
Copy link
Owner

tgaff commented Feb 3, 2016

see https://github.com/johnpapa/angular-styleguide#style-y032

function SomeController($scope, $log) {
    var vm = this;
    vm.title = 'Some Title';

This is likely something that most students won't need, but it is simple enough to do from the beginning. For now I'm putting it at the bottom as an "introduce later" since that's what we discussed but I'd be open to changing that if there are new opinions.

@tgaff
Copy link
Owner Author

tgaff commented Feb 8, 2016

I'm leaning toward using this immediately. Any student that does a project stands a reasonable risk of running into this and the additional mental load from the beginning is (I think) quite small.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant