Вопрос

my plunk http://plnkr.co/edit/3WRDCv?p=preview

app.js

'use strict';

var app = angular.module('txtbinge', ['ionic', 'firebase']);

app.run(function($ionicPlatform) {
  $ionicPlatform.ready(function() {
    if(window.StatusBar) {
      StatusBar.styleDefault();
    }
  });
});

app.config(function($stateProvider, $urlRouterProvider) {
  $stateProvider

  .state('app', {
    url: '/app',
    abstract: true,
    controller: 'ContentController',
    templateUrl: 'applayout.html'
  })

  .state('app.home', {
    url: '/home',
    views: {
      'centerContent' :{
        templateUrl: 'home.html'
      }
    }
  })

  //test plunker to see if stateParams are causing issues
  .state('crop', {
    url: '/crop',
    //template: 'test',
    templateUrl: 'applayout.html',
    controller: 'CropController'
  })

  .state('crop-image', {
    url: '/crop-image/:imageURI',
    //template: 'test',
    templateUrl: 'menu.html',
    controller: 'CropController'
  });

  $urlRouterProvider.otherwise('/crop');
});

try loading a templateURL from crop or crop-image states. It doesn't seem to work. Which is very odd considering app.home does load. Any ideas?

Это было полезно?

Решение

Well, templateUrl is case sensitive...

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top