This is so odd. without adding $onInit. I do the following 
console.log('Directive Controller vm', scope.vm);

   1. and I see this! I want that virtStats, but I cant access it via 
   scope.vm.virtStats. This is weird. I am sure this is basic javascript 
   issue not angular
   2. Dashboard {deptvirts: Array(0), virtStats: Array(0), title: 
   "Dashboard", virtitems: Array(0)}
      1. deptvirts:Array(61)
      2. rmas:Array(0)
      3. title:"Dashboard"
      4. virtStats:Array(9)
      5. virtitems:Array(9)
      6. __proto__:Object
   

On Friday, June 9, 2017 at 8:25:14 PM UTC-7, Sander Elias wrote:
>
> Hi Tito,
>
> Do this in your dashboard controller. Don't use the link function, it is 
> of very limited use.
>
> function Dashboard() {
> const vm = this;
>
> vm.$onInit = () => {
> console.log(vm);
> }
> }
>
>
> Regards
> Sander
>

-- 
You received this message because you are subscribed to the Google Groups 
"Angular and AngularJS discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to