You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi I've noticed that macro for controller code generation does not generate defs and vars defined in trait. Below are two samples. After clicking button in example 1 nothing happens, but in example 2 TODO: refresh maps is printed in console. Would be possible to extend controller code generation to traits defs and vars, this would be really helpful or are there some annotations to accomplish that.
Example code 1:
trait CommonView {
var currentView = "map"
def refreshMaps() = println("TODO: refresh maps")
}
class UserDetailsCtrl ($location: Location, $scope: Scope) extends Controller with CommonView {
currentView = "map"
}
HTML:
<div ng-controller="UserDetailsCtrl as ctl">
{{ctl.currentView}}
<button ng-click="ctl.refreshMaps()">Refresh</button>
</div>
Hi I've noticed that macro for controller code generation does not generate defs and vars defined in trait. Below are two samples. After clicking button in example 1 nothing happens, but in example 2
TODO: refresh maps
is printed in console. Would be possible to extend controller code generation to traits defs and vars, this would be really helpful or are there some annotations to accomplish that.Example code 1:
Example 1 debug macro code generation output:
Example code 2:
Example 2 debug macro code generation output:
The text was updated successfully, but these errors were encountered: