2014-04-15 2 views
1

내 쿵하는 소리에로드되지 http://plnkr.co/edit/3WRDCv?p=previewAngularJS와 UI-라우터 templateURL이 plunker

'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 상태에서 templateURL를로드하십시오 app.js. 그것은 작동하지 않는 것 같습니다. app.home을 고려하면 매우 이상합니다. 어떤 아이디어?

답변

4

글쎄, templateUrl은 대소 문자를 구분합니다 ...

+0

입니다. 나는 아직도 문제가 있다고 생각한다. –

+0

그것이 좋았다. 감사! –

+0

젠장, 나는 템플릿 URL을 가지고 있었지만 작동하지 않았다. – oyaebunterkrah

관련 문제