Yeoman 각형 스캐 폴더의 기본 설치가 있고 그 수명 동안 라우터에 기본 템플릿을로드 할 수 없습니다. 여기 내 설치가Yeoman/Angular/Coffee .when() 라우터가 라우팅되지 않습니다. GET을 할 수 없습니다.
// index.html
<body ng-app="mvmdApp">
<div class="container" ng-view=""></div>// not sure how ng-view plays into this
// app.coffee
myAppModule = angular.module("mvmdApp", [])
.config(($routeProvider, $locationProvider) ->
$locationProvider.html5Mode true
$routeProvider
.when("/",
templateUrl: "views/main.html"
controller: "MainCtrl"
)
.when("/youtube",
templateUrl: "views/youtube.html"
controller: "YoutubeCtrl"
)
)
// main.js
angular.module('mvmdApp')
.controller 'MainCtrl', ($scope) ->
$scope.awesomeThingss = [
'HTML5 Boilerplate'
'AngularJS'
'Karma'
]
$scope.youtube = ($scope) ->
alert 'hi'
.controller "YoutubeCtrl", ($scope) ->
alert 'Work!'
// views/youtube.html
<div class="youtube-unit">
<div class="outer-frame">
<div class="inner-frame">
<iframe width="560" height="315" src="//www.youtube.com/embed/2FNEiTjcMM0" frameborder="0" allowfullscreen="allowfullscreen"></iframe>
</div>
</div>
</div>
메인 컨트롤러의 부하를 잘, I는 배출량의 가능한 한 많이 복사하여 복사하십시오.
로컬 호스트 : 9000/youtube로 이동하면 Cannot GET /youtube
메시지가 나타납니다. 나는 모든 조합을 시도한 것 같은 기분이 든다.
감사합니다. –