$templateCache doesn't seem to work with ionic
Hello,
I've been developping few apps in Angular Js and Phonegap, and I'm converting my process to use ionic as my defaut framework, because you did an amazing job with ionic.
In my dev process, I heavily use the $templateCache to optimize the performance as much as possible.
I've created a basic structure with 2 modules (Module1,Module2) and included it in a main module that imports Module1 and Module2 and configure the states for switching between 2 modules.
If I use ui-view from ui-router, it works, but when I use ion-nav-view, it does not seem to work.
This is my plunkr to illustrate this point :
http://plnkr.co/edit/e9KxoM6PqNeTEWjJNMfi?p=preview
I may have done something wrong. Please help me to understand what happened for me to leverage the power of ionic soon.
Thanks
Best Regards
Bobby
You can change your css. Inspect the element and figure out exactly what rules you need to apply.
.selected a.item-content {
background: lightcoral;
}
Just be sure your css selector is specific enough to overwrite the defaults.
EDIT: answered wrong issue.
Hello
Thanks for your answer.
But I hardly understand how it could be a css issue in this case. Let me explain my test in plunkr to avoid you reading it.
- This is the ion-nav-view :

- When I inspect it, nothing appears in the div, even if I click on the button Route 1 and Route 2 :

- I comment the ion-nav-view div and I add ui-view directive from ui-router, and in this case, it works, the view appears and change on click on Route 1 and Route 2 links :

Do you have any ideas why it does not work ?
Thanks
Bobby
I answered the wrong issue. My apologies.
Hello
OK No problem. Can you open the again ?
Thanks
Bobby
I'll take a look tomorrow
Hello Guys,
Any news about this bug. I'm eager to use ionic framework for my new projects coming next week. But my workflow use extensively $templateCache.
So I cannot use ionic with this pending issue.
Can anyone have a look ? It would be awesome.
Thanks
Best Regards
Bobby
This is very weird, because it should work as is.
Your plunker had two problems:
- You didn't include module 'ionic' as a dependency
- You were using ion-nav-view as an attribute directive, while it is in fact an element directive.
Fixed plunker: http://plnkr.co/edit/CrFZJOU0bzdEmBbJZLUK?p=preview
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.