1

我的笨拙http://plnkr.co/edit/3WRDCv?p=preview

应用程序.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');
});

crop尝试从或crop-image状态加载模板URL。它似乎不起作用。app.home考虑到负载,这很奇怪。有任何想法吗?

4

1 回答 1

4

嗯,templateUrl区分大小写...

于 2014-04-15T22:38:03.763 回答