Laredvel에서 간단한 각도 코드 작업을 할 수 없습니다. 코드 펫에서 테스트했지만 작동합니다.각도가 laravel에서 작동하지 않습니다.
내 꿀꺽 꿀꺽에 각이있다. 그리고 다른 모든 스크립트에 주석을 달고 (이미 복사 된 스크립트를 resources/js 디렉토리에서 삭제) 각형으로 만 테스트하려고했습니다.
gulp.js
elixir(function(mix) {
mix
// .copy('vendor/bower_components/jquery/dist/jquery.js', 'resources/js/1-jquery.js')
// .copy('vendor/bower_components/bootstrap/dist/js/bootstrap.js', 'resources/js/2-bootstrap.js')
.copy('vendor/bower_components/angular/angular.js', 'resources/js/3-angular.js')
// .copy('vendor/bower_components/lightgallery/dist/js/lightgallery-all.js', 'resources/js/4-lightgallery.js')
// .copy('vendor/bower_components/lightslider/dist/js/lightslider.js', 'resources/js/5-lightslider.js')
.scriptsIn('resources/js')
.version([
'public/css/app.css',
'public/js/all.js'
])
});
blade.php
{!! Form::open(array('route' => 'order', 'class' => 'go-right calculator', 'files' => true, 'ng-app' => 'SaunaDoorCalc', 'ng-controller' => 'SaunaDoorCalcController')) !!}
<div class="form-group door_size_radio col-xs-12 col-sm-6" style="margin-bottom:67px;"><h4>Размер дверной коробки (в миллиметрах)</h4>
<div ng-repeat="a in sizeswitch" class="form-group">
<input type="radio" value="@{{a.value}}" name="door_size_radio" class="radio">
<label for="door_size_radio" class="radio">@{{a.label}}</label>
</div>
</div>
{!! Form::close() !!}
출력 웹 페이지에서
angular
.module('SaunaDoorCalc',[])
.controller('SaunaDoorCalcController', function($scope) {
$scope.sizeswitch = [
{ value: 'standard', label: 'Стандартный' },
{ value: 'special', label: 'Ввести размер' }
];
$scope.submit = function() {
alert('submit');
};
$scope.myDate = new Date();
$scope.minDate = new Date(
$scope.myDate.getFullYear(),
$scope.myDate.getMonth() - 2,
$scope.myDate.getDate());
$scope.maxDate = new Date(
$scope.myDate.getFullYear(),
$scope.myDate.getMonth() + 2,
$scope.myDate.getDate());
$scope.onlyWeekendsPredicate = function(date) {
var day = date.getDay();
return day === 0 || day === 6;
}
});
을 app.js I {{a.label}}
을 참조하십시오.
나는 각도가 app
라는 모듈을 찾고, 콘솔 오류에 JS 섹션
Error: [$injector:modulerr] Failed to instantiate module app due to:
[$injector:nomod] Module 'app' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.
http://errors.angularjs.org/1.5.6/$injector/nomod?p0=app
minErr/<@http://site.dev/build/js/all-6fc346934b.js:12247:12
module/<@http://site.dev/build/js/all-6fc346934b.js:14280:17
[email protected]://site.dev/build/js/all-6fc346934b.js:14204:38
[email protected]://site.dev/build/js/all-6fc346934b.js:14278:14
loadModules/<@http://site.dev/build/js/all-6fc346934b.js:16786:22
[email protected]://site.dev/build/js/all-6fc346934b.js:12501:11
[email protected]://site.dev/build/js/all-6fc346934b.js:16770:5
[email protected]://site.dev/build/js/all-6fc346934b.js:16692:19
bootstrap/[email protected]://site.dev/build/js/all-6fc346934b.js:13956:20
[email protected]://site.dev/build/js/all-6fc346934b.js:13977:12
[email protected]://site.dev/build/js/all-6fc346934b.js:13862:5
@http://site.dev/build/js/all-6fc346934b.js:43197:5
jQuery.Callbacks/[email protected]://site.dev/build/js/all-6fc346934b.js:3187:11
jQuery.Callbacks/[email protected]://site.dev/build/js/all-6fc346934b.js:3317:7
[email protected]://site.dev/build/js/all-6fc346934b.js:3536:3
[email protected]://site.dev/build/js/all-6fc346934b.js:3552:2
거기에있는 내용을 확인 하시겠습니까? –
예. 무언가가있다. 처음 게시물 – schel4ok