I’ve started my app using a beta version of Creator and it grew alot, so I need now to change the whole structure of the app. Right now I have all my controllers and views in index.html, which is not a great idea.
I made a “templates” folder on my www folder and I’ve created here files corresponding to all my views.
Ex: my testPage.html file has this structure:
<ion-header-bar class="bar-assertive"> <button class="button icon-left ion-chevron-left button-clear" ng-click="back()" translate='back'></button> <h1 class="title" style='margin-left:25%'>Test Sida</h1> </ion-header-bar> <ion-content padding="true" class="has-header"> <h3 style='color:red'>A really awesome test page</h3> </ion-content>
I am importing the file in my index,html like this:
When I check my app with Chrome Developer Tools (m server is started with ionic serve --lab) I get this error:
Uncaught SyntaxError: Unexpected token <
I get it even twice for every file I import in index.html from my “templates” folder.
My question is: what am I missing? Should I write some kind of function instead?
I should also mention that the app is performing normally, but I get this syntax error everytime and this bothers me. Can anyone help?