我无法将我的angular.min.js文件链接到Laravel master.blade.php文件,因为它无法正常工作?

index.blade.php </ p>

  @extends('layout  .frontend.master')
@ section('content')
&lt; div class =“container container-content”&gt;

&lt; h2&gt; 在线申请&lt; / h2&gt;
&lt; div class =“well”&gt;

&lt; form role =“”class =“form-horizo​​ntal”action =“”name =“myapp”&gt;
&lt; div class =“form-group”&gt;
&lt; div ng-app =“myapp”&gt;
&lt; label for =“firstname”class =“col-sm-2 control-label”&gt; 名称&lt; / label&gt;
&lt; div class =“col-sm-10”&gt;
&lt; input type =“text”class =“form-control”
placeholder =“输入名称”ng-model = “名称” &GT;&LT; p为H. @ {{name}}&lt; / p&gt;
&lt; / div&gt;
&lt; / div&gt;
&lt; / div&gt;
</ code> </ pre>

master .blade.php </ p>

 &lt; script type =“text / javascript”src =“{{url :: asset('angular / angular.min.js')}}  “&gt;&lt; / script&gt; 
&lt; script src =”{{url :: asset('http://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js') }&gt;&lt; / script&gt;

&lt;! - endo fo js file - &gt;

&lt; / head&gt;
&lt; body&gt;
&lt; div id =“wrapper “&gt;
@section('header')
{!! view('layout / frontend / header')!!}
@stop

@section('footer')
{!! view('layout / frontend / footer')!!}
@stop

@yield('header')
@yield('content')
@yield('footer')

&lt; / div&gt;&lt; / body&gt;&lt; / html&gt;
</ code> </ pre>

由于我想要角度js的绑定但它无法正常工作我无法绑定 显示输入和仅跟随</ p>

{{name}} </ p>

因为我在{{避免laravel冲突但使用它不起作用之前'使用@。

请给我适当的解决方案
thank you </ p>
</ div>

展开原文

原文

index.blade.php

@extends('layout.frontend.master')
@section('content')
    <div class="container container-content">

            <h2> Apply online </h2>
            <div  class="well">

            <form role="" class="form-horizontal" action="" name="myapp">
                <div class="form-group">
                <div ng-app="myapp">
      <label for="firstname" class="col-sm-2 control-label"> Name</label>
      <div class="col-sm-10">
         <input type="text" class="form-control" 
            placeholder="Enter Name" ng-model="name"><p> @{{ name }}</p>
      </div>
      </div>
   </div>

master.blade.php

<script type="text/javascript" src="{{ url::asset('angular/angular.min.js')}}"></script>
<script src="{{ url::asset('http://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js')}}"></script>

<!--endo fo js file-->

  </head>
  <body>
    <div id="wrapper">
    @section('header')
    {!! view('layout/frontend/header') !!}
    @stop


    @section('footer')
    {!! view('layout/frontend/footer')!!}
    @stop

    @yield('header')
    @yield('content')
    @yield('footer')

    </div></body></html>

Since i wanted the binding of angular js but its not working i can't bind the input and only following is displayed

{{ name }}

since i use @ before the {{ to avoid laravel confliciton but its not working. Please provide me proper solution thank you

1个回答



为什么使用</ p>

 

url :: asset('http:/ /ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js')


nn

该链接不是资产,因为它不是 放在您的资产文件夹中,只需简单地输入:</ p>

 

src =“http://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/ angular.min.js“

</ pre>
</ div>

展开原文

原文

Why do you use


    url::asset('http://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js')

The link is not an asset, as in its not placed in your asset folder, just put in in plainly:


    src="http://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js"

dongxi4335
dongxi4335 那也不行。 我无法链接我的angular.min.js文件??
4 年多之前 回复
Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问
相关内容推荐