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

Support controllerAs syntax in ion-nav-view (#3058, #2499) #3651

Closed
wants to merge 3 commits into from

Conversation

urish
Copy link

@urish urish commented May 1, 2015

No description provided.

@thaiat
Copy link

thaiat commented May 14, 2015

+1

@paulogr
Copy link

paulogr commented May 14, 2015

+1
Em 14/05/2015 09:55, "Avi Haiat" [email protected] escreveu:

  • 1


Reply to this email directly or view it on GitHub
#3651 (comment).

@ClemMakesApps
Copy link

+1

1 similar comment
@cmartin81
Copy link

+1

@urish
Copy link
Author

urish commented Jul 18, 2015

@Ionitron any chance of merging this?

@mhartington mhartington added this to the 1.1 milestone Jul 26, 2015
@fabiosussetto
Copy link

Please guys this GOT to be working on ionic stable.

@ClemMakesApps
Copy link

Based on the tagging, this looks like it'll be added on next release

@BentoumiTech
Copy link

Like it should have been added to the 1.1 version could anyone merge it ?

@mhartington mhartington modified the milestones: 1.1, 1.2 Aug 15, 2015
@mhartington
Copy link
Contributor

There were a few other things that took priority. Will revisit this.
You can still use controller as though, nothing is preventing you from doing so

controller: 'MainCtrl as main'

@urish
Copy link
Author

urish commented Aug 15, 2015

@mhartington thanks for the response!

At least in my case, the controller: 'MainCtrl as main' complicated things, as my paradigm is to declare controllers as ES6 classes, then use controller: MainCtrl instead of having to register them in angular and then reference them by name. This is why I find this feature very useful.

I hope that this makes sense to you :-)

@BentoumiTech
Copy link

@mhartington I didn't know that I could use controller: 'MainCtrl as main'Thanks !

@cmartin81
Copy link

I use ng-decorators to create controller classes with ES6 decorators. And I need to reference to a class object and not a string. So that is why I cannot use 'MainCtrl as main' syntaks in my code.

@mhartington
Copy link
Contributor

Makes sense, I realize that it's not a perfect solution for everyone. Which is why I want this in as well.

@mhartington
Copy link
Contributor

@urish any chance you could provide a test for this?

@urish
Copy link
Author

urish commented Aug 25, 2015

@mhartington yes

@urish
Copy link
Author

urish commented Aug 25, 2015

@mhartington here we go :)

@mhartington
Copy link
Contributor

@urish much obliged

mhartington pushed a commit that referenced this pull request Aug 27, 2015
Closes #3058. Closes #2499. Cloese #3651
This adds support for setting up controllers like this

.state('app', {
  url: '/app',
  abstract: true,
  templateUrl: 'templates/menu.html',
  controller: 'AppCtrl',
  controllerAs: 'main'
})
@mhartington
Copy link
Contributor

I derped the commit message, but this has now been added via a665d1d

Please test this out and report back any errors.

@urish
Copy link
Author

urish commented Aug 27, 2015

Yay!

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

Successfully merging this pull request may close these issues.

8 participants