File paths in compiled iOS app

Hi Guys

I’m having a problem that I think is file path related. My file structure looks like this:

www

  • img
    ---- 01.png
    ---- 02.png
  • templates
    ---- profile.html
    ---- other.html
  • js
    ---- app.js
    ---- controllers.js
    index.html

When I run my code with ionic serve, everything works like it should. But when I compile my code and run it in the iOS simulator I am getting a resource not found error in the console. This is happening for all images found in www/img and all templates found in www/templates.

This to me is very strange as it seems to be only resources that are referenced in the in the controllers.js file eg.

	$ionicModal.fromTemplateUrl('templates/profile.html', {
	scope: $scope,
	animation: 'slide-in-up'
}).then(function(profileModal) {
	$scope.profileModal = profileModal;
});

OR

	$rootScope.map.markerIcons = {
	hack: {
		iconUrl: 'img/01.png'
	}

However in my app.js file I reference the templates in the same way and they work just fine eg.

	.state('start', {
		url: "/other",
		templateUrl: "templates/other.html"
	})

As I said before this all works 100% in ionic serve but not in the simulator…

Any help would be great as I’m very stuck… Thanks…

Can a moderator please remove this thread. It was a mistake on my side not syncing git repository’s properly!