Closed derek-fong closed 8 years ago
@DmitryEfimenko and @Urigo Here's my code for 'navigation' from the example above.
angular.module('gerenciadorImoveis').directive('navigation',
() => {
return {
restrict: 'E',
templateUrl: 'client/view/padrao/navigation.ng.html',
controllerAs: 'navigation',
controller: function($scope,$reactive){
$reactive(this).attach($scope);
this.sair = () => { Accounts.logout(); };
this.autorun(() => {
this.logado = Meteor.userId() !== null;
this.usuario = Meteor.userId();
});
}
}
}
);
And at the body of my app:
<div class="ui fluid basic segment">
<img draggable="false" src="pimentel.png" class="ui centered large image">
<navigation></navigation>`
</div>
<div class="ui secondary fluid segment teal padded" ui-view></div>
It's all about angular-meteor. The 'ui-view' shows others directives with templates. Try something like this and you'll get this error too.
Error: scope.viewModel is not a function. (In 'scope.viewModel(this._vm)', 'scope.viewModel' is undefined)
Everyone - 1.3.6
is out with all of the fixes you asked for.
@insidemybrain can you please provide a reproduction project with that scenario?
@Urigo I've added you on my private project. Thanks.
I'm running version 1.3.6 and I have the same issue as @insidemybrain
Seems to only happen for directives placed directly in the body. Everything inside ui-view
seems to work fine.
Also see #1238
@insidemybrain do you use angular
or angular-with-blaze
package?
Also, where is your main HTML file located? in the root or inside client
folder?
closing this issue as the original problems were solved. Please open separate issues for separate problems. Thanks
@insidemybrain can you tell me if now with 1.3.9_2
everything is working for you?
@Urigo Everything is fine now! Thank you
I am trying to follow the
helpers
API example but when I try to do something like this in mycontroller
Client console keeps giving me this warnings:
defining 'apples' value helper, note that this feature will be deprecated in 1.4 in favor of using 'getReactively' - http://www.angular-meteor.com/api/1.3.1/get-reactively
overriding 'apples'
I have also tried using
getReactively()
but it does not seem to work properly so I am wondering what is the "proper" way of usinghelpers()
/ am I missing something when trying to usegetReactively()
?