title: Getting Value from Dynamic Url and Post it into HTML/PHP by Using AngularJS
body: <p>I would like to ask whether I can get the data from dynamic URL... Here is the case:</p>
  
  <ol>
  <li>
  I have given an (a) html tag into my angularJS php file to give direction to certain page with the value inside it e.g. <code>localhost:8080/someurl/blablabla/{{item.master}}</code> so the output is based on what I have clicked... so it will be <code>localhost:8080/someurl/blablabla/221</code>
  </li>
  <li>
  After that, I have a laravel 5.2 and given a route based on this dynamic url, e.g. <code>Route::get('order/{id}','someController@index')</code>
  </li>
  <li>
  After this route, I have prepared the php files and it is ready to display the data
  </li>
  </ol>
  
  <p>The problem is, I don't know which angularJS code that I should use to display the data based on the <code>{{item.master}}</code> in this new page, when I use <code>$http.get</code>, it doesn't get anything, is there any clue about this?</p>
  
  <p>UPDATED</p>
  
  <p>Here is the codes:</p>
  
  <ol>
  <li><p>HTML (order.html)</p>
  
  <pre><code>&lt;div class="itemcheck" ng-repeat="item in dataItem.stores | regex:'name':alfabet | orderBy: 'name' | filter: searchItem" ng-model="item"&gt;
  &lt;div class="left" ng-if="item.preparation == ''" ng-click="klikItem(item)"&gt;&lt;i class="fa fa-circle silver"&gt;&lt;/i&gt;{{item.name}}&lt;/div&gt;
   &lt;div class="left" ng-if="item.preparation == '1'" ng-click="klikItem(item)"&gt;&lt;i class="fa fa-circle green"&gt;&lt;/i&gt;{{item.name}}&lt;/div&gt;
   &lt;div class="left" ng-if="item.preparation == '2'" ng-click="klikItem(item)"&gt;&lt;i class="fa fa-circle yellow"&gt;&lt;/i&gt;{{item.name}}&lt;/div&gt;
  &lt;div class="left" ng-if="item.preparation == '3'" ng-click="klikItem(item)"&gt;&lt;i class="fa fa-circle pink"&gt;&lt;/i&gt;{{item.name}}&lt;/div&gt; &lt;div class="right" ng-click="tambahItem(item)"&gt;&lt;a&gt;+ Tambahkan&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;
  </code></pre></li>
  </ol>
  
  <p>Let's not focus on "tambahkan" but the item.name when I put klikItem function</p>
  
  <p>So, when I click, the klikItem() function is triggered (what I want) or let's say I put the tag a inside the {{item.name}} function and when I click that it goes to order/{{item.id}} (somehow like that)...</p>
  
  <p>Nah, the problem is, how can I get the data from order/{{item.id}}? If I use $http.get, it must have the data, and when I put id for example</p>
  
  <pre><code>$scope.tampilkanDeskripsiItem = function(id){
          var url = 'order/' + id;
          $http.get(url).success(function(data){
              $scope.deskripsiItem = data;
          });
      };
  
      $scope.tampilkanDeskripsiItem();
  </code></pre>
  
  <p>this code will return error as "id" is not defined...</p>