Hitting the limits of Angular (help/insight/suggestion wanted and welcomed!)


#1

I’m just picking up Ionic and Angular; but I’m diving in all the way. I decided to create directives to pass parameters to within my block. The directive passes parameters to this markup:

<ion-tab ng-if="platform != 'android'" 
         title="{{label}}"  
         icon-off="{{off}}" 
         icon-on="{{on}}" 
         href="#/tab/{{view}}"> 
  <ion-nav-view name="tab-{{view}}"></ion-nav-view>
</ion-tab>

<ion-tab ng-if="platform == 'android'" 
         title="{{label}}" 
         class="tab-item" href="#/tab/{{view}}">
  <ion-nav-view name="tab-{{view}}"></ion-nav-view>
</ion-tab> 

Here is the problem with this. It appears that {{view}} is rendered on ion-tab but not the inner block, ion-nav-view. If I hard code the ion-nav-view to dash (this is all form the starter example), it works but the position get messed up. Like it doesn’t understand the header is there.

I seems like some kind of scoping issue.

ANY SUGGESTIONS MASSIVELY APPRECIATED. I’m trying get a good grasp of Angular+Ionic and I’m trying not to repeat myself by building directives. Another idea is maybe to just use ng-include and somehow pass parameters to the block.


#2

You’d think this wouldn’t be that difficult but from a little bit of research–holy cow Angular is a mess… still researching solution


#3

This is probably and Angular issue. Here is a more detailed form of this problem