lundi 30 janvier 2017

Laravel Expression conflicts

I am new to laravel and angular frameworks. Since by default they have the same expressions used, the curly braces, I made the angular expression be the different one so I declared angular to use {! !} expression.

In displaying the data, it worked well.

```<table class="table">
    <thead>
         <tr>
            <th>ID</th>
            <th>Name</th>
            <th>Is Active?</th>
            <th><button id="btn-add" class="btn btn-primary btn-xs" ng-click="toggle('add', 0)">Add New Brand</button></th>
    </tr>
</thead>
<tbody>
    <tr ng-repeat="brand in brands">
        <td>{! brand.id !}</td>
        <td>{! brand.name !}</td>
        <td>{! brand.isActive!}</td>
        <td>
            <button class="btn btn-default btn-xs btn-detail" ng-click="toggle('edit', brand.id)">Edit</button>
            <button class="btn btn-danger btn-xs btn-delete" ng-click="confirmDelete(brand.id)">Delete</button>
        </td>
    </tr>
</tbody>

```

But when I display an angular expression inside an HTML attribute, it seems it didn't worked.

Example:

<input type="text" class="form-control has-error" id="!identify!}" name="{!identify!}" placeholder="Brand Name" value="" ng-model="{!identify!}" ng-required="true">

It didn't retrieved the value for @{! identify !}. I need your help.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire