Bootstrap 4 - Row of inputs 1% larger than full width - html

So I have a simple form I've been messing with:
<div class="container">
<form name="form" method="post">
<div class="form-row mt-5">
<div class="col-3">
<label class="sr-only form-control-label required" for="form_column_name">Column Name</label>
<select id="form_column_name" name="form[column_name]" class="form-control-lg form-control"><option value="Field 1" selected="selected">Field 1</option><option value="Field 2">Field 2</option></select>
</div>
<div class="col-8">
<label class="sr-only form-control-label required" for="form_column_value">Column Value</label>
<input type="text" id="form_column_value" name="form[column_value]" required="required" class="form-control-lg form-control" placeholder="Query" />
</div>
<div class="col-1">
<button class="btn btn-primary btn-lg" type="button">Search</button>
</div>
</div>
<div class="row mt-3">
<div class="col-12">
<div class="progress" style="height: 25px;">
<div class="progress-bar progress-bar-striped progress-bar-animated" role="progressbar" aria-valuenow="75" aria-valuemin="0" aria-valuemax="100" style="width: 100%"></div>
</div>
</div>
</div>
<div class="row mt-3">
<div class="col-12">
<table class="table" width="101%">
<thead class="thead-light">
<tr>
<th scope="col">#</th>
<th scope="col">First Name</th>
<th scope="col">Last Name</th>
<th scope="col">Username</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
</div>
<input type="hidden" id="form__token" name="form[_token]" value="n0n-XzlZGwNC4-GUi8PiM5UYC25lSx_vMg7qwI7OPSg" />
</form>
</div>
It's a Symfony 3 Twig template, and it looks like this:
As you can see, the inputs are just slightly longer than the other elements, even though everything is at col-12.
Does anyone know how to fix this? I can set the progress bar to width: 101%, but I couldn't figure out the how to change the table. Also it feels a little hacky, so I'm wondering if there is a better solution.
Additionally, using container-fluid causes the size difference to change:
So I'm assuming I've setup the form wrong. I've tried using form-inline, but couldn't get the margins and centring to work that way either.

It looks like you need to reset padding on the button and give it a width:
<button class="btn btn-primary btn-lg pr-0 pl-0 w-100" type="button">Search</button>
demo below to play in full page
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.0.0-beta/css/bootstrap.min.css" rel="stylesheet"/>
<div class="container">
<form name="form" method="post" >
<div class="form-row mt-5">
<div class="col-3">
<label class="sr-only form-control-label required" for="form_column_name">Column Name</label>
<select id="form_column_name" name="form[column_name]" class="form-control-lg form-control"><option value="Field 1" selected="selected">Field 1</option><option value="Field 2">Field 2</option></select>
</div>
<div class="col-8">
<label class="sr-only form-control-label required" for="form_column_value">Column Value</label>
<input type="text" id="form_column_value" name="form[column_value]" required="required" class="form-control-lg form-control" placeholder="Query" />
</div>
<div class="col-1" style="flex-shrink:1">
<button class="btn btn-primary btn-lg pr-0 pl-0 w-100" type="button">Search</button>
</div>
</div>
<div class="row mt-3">
<div class="col-12">
<div class="progress" style="height: 25px;">
<div class="progress-bar progress-bar-striped progress-bar-animated" role="progressbar" aria-valuenow="75" aria-valuemin="0" aria-valuemax="100" style="width: 100%"></div>
</div>
</div>
</div>
<div class="row mt-3">
<div class="col-12">
<table class="table" width="101%">
<thead class="thead-light">
<tr>
<th scope="col">#</th>
<th scope="col">First Name</th>
<th scope="col">Last Name</th>
<th scope="col">Username</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
</div>
<input type="hidden" id="form__token" name="form[_token]" value="n0n-XzlZGwNC4-GUi8PiM5UYC25lSx_vMg7qwI7OPSg" />
</form>
</div>
you can also add responsive class to let room to the button text:
<div class="col-lg-8 col-sm-7">
<div class="col-lg-1 col-sm-2">
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.0.0-beta/css/bootstrap.min.css" rel="stylesheet"/>
<div class="container">
<form name="form" method="post" class="m-0">
<div class="form-row mt-5">
<div class="col-3">
<label class="sr-only form-control-label required" for="form_column_name">Column Name</label>
<select id="form_column_name" name="form[column_name]" class="form-control-lg form-control"><option value="Field 1" selected="selected">Field 1</option><option value="Field 2">Field 2</option></select>
</div>
<div class="col-lg-8 col-sm-7">
<label class="sr-only form-control-label required" for="form_column_value">Column Value</label>
<input type="text" id="form_column_value" name="form[column_value]" required="required" class="form-control-lg form-control" placeholder="Query" />
</div>
<div class="col-lg-1 col-sm-2" style="flex-shrink:1">
<button class="btn btn-primary btn-lg pr-0 pl-0 w-100" type="button">Search</button>
</div>
</div>
<div class="row mt-3">
<div class="col-12">
<div class="progress" style="height: 25px;">
<div class="progress-bar progress-bar-striped progress-bar-animated" role="progressbar" aria-valuenow="75" aria-valuemin="0" aria-valuemax="100" style="width: 100%"></div>
</div>
</div>
</div>
<div class="row mt-3">
<div class="col-12">
<table class="table" width="101%">
<thead class="thead-light">
<tr>
<th scope="col">#</th>
<th scope="col">First Name</th>
<th scope="col">Last Name</th>
<th scope="col">Username</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
</div>
<input type="hidden" id="form__token" name="form[_token]" value="n0n-XzlZGwNC4-GUi8PiM5UYC25lSx_vMg7qwI7OPSg" />
</form>
</div>

Related

How to display a div on the top of another in a container (Bootstrap)?

I've added this div containing a date picker and I've done it in a form, since there will be more fields later, but the first one I've added displays next to the table, instead of above. I've seen many answers to a similar question, but none applied to my situation.
This Fiddle shows it correctly.
Here's the container's piece of code:
<div class="container-fluid" id="container">
<br>
<div id="page" style="color:#373737">
<div class="row justify-content-around" id="selectFieldsDiv">
<div class="col-md-3 form-group">
<label for="agencySelect">Choose</label>
<select id="agencySelect" onchange="loadClientsFromSS(selectedAgency())">
<option value=""></option>
<option value="option1">Option1</option>
</select>
</div>
<div class="col-md-3 form-group">
<label for="clientSelect">Choose</label>
<select id="clientSelect" onchange="loadClientTasks(selectedClient())">
<option value="dsadads">Option1</option>
</select>
</div>
<div class="col-md-3 form-group">
<div id="addTaskBtnSpot"><button id="addTaskBtn" type="submit" class="btn btn-primary" onclick="addTaskFields()">Add task</button></div>
<div id="cancelTaskBtnSpot"></div>
</div>
</div>
</div>
<br>
<div id="addTaskFieldsDiv">
<form>
<label for="birthday">Birthday:</label>
<input type="date" id="birthday" name="birthday">
</form>
</div>
<div class="row" id="tableDiv">
<div class="col">
<div id="search-results" class="table-responsive">
<div class="card" id="card">
<table class="table table-borderless table-hover" id="dtable">
<thead style="white-space: nowrap">
<tr>
<th style="width: 4%" class="text-center">Client ID</th>
<th style="width: 4%" class="text-center">Task No</th>
<th style="width: 25%" class="text-center">Task</th>
</tr>
</thead>
<tbody>
<tr>
<td class="align-middle" style="word-wrap: break-word;max-width: 160px;text-align:center">AC002</td>
<td class="align-middle" style="word-wrap: break-word;max-width: 160px;text-align:center">1</td>
<td class="align-middle" style="word-wrap: break-word;max-width: 160px;text-align:center">Review and approve on page recommendations</td>
</tr>
<tr>
<td class="align-middle" style="word-wrap: break-word;max-width: 160px;text-align:center">AC002</td>
<td class="align-middle" style="word-wrap: break-word;max-width: 160px;text-align:center">2</td>
<td class="align-middle" style="word-wrap: break-word;max-width: 160px;text-align:center">Review and approve content recommendations</td>
</tr>
</tbody>
</table>
</div>
<br>
</div>
</div>
</div>
</div>
Appreciate our help!
First of all remove the <br> and <div id="page"> because this (might) breaks the Bootstrap container>row>col layout.
<div class="container-fluid" id="container">
<br />
<div id="page" style="color: #373737">
<div class="row justify-content-around" id="selectFieldsDiv">
Then because the datepicker is located within the Bootstrap container start the layout with a proper row and column to wrap the form/datepicker in like so:
<div id="addTaskFieldsDiv" class="row">
<div id="addTaskFieldsDiv" class="col">
<form>
<label for="birthday">Birthday:</label>
<input type="date" id="birthday" name="birthday" />
</form>
</div>
</div>
Make sure to repeat this pattern (container>row>col) throughout the document and see if fits your needs.

HTML/Bootstrap layout

I'm trying to layout a section like the image here.
I'm using bootstrap 4. I've tried laying out with rows and cols but can never achieve this look. Right now I'm using a <ul> and <li>. Inside the <li> I have 3 inputs. I've tried putting all three inside a <div class="form-group form-inline"> and also tried separating them out to individual "form-group" divs with no luck. I'm sure I just don't understand enough about how to lay things out. I'm hoping someone can help me understand and maybe help me out here.
This is as close as I have come but I can't seem to get the widths correct and it seems to break onto the new line.
<div id="cardBody" class="card-body">
<div class="row">
<div class="container-fluid">
<div class="col-md-6">
<label class="control-label ml-2">Description</label>
</div>
<div class="col-md-4">
<label class="control-label">Link</label>
</div>
<div class="col-md-1">
<label class="control-label">Count</label>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<form>
<ul id="itemList" class="list-group">
<li class="list-group-item">
<div class="form-group form-inline mb-0">
<label for="description">⋮⋮</label>
<input type="text" class="form-control ml-2 mr-2" id="description" placeholder="">
<label class="sr-only" for="link">Link</label>
<input type="text" class="form-control mr-2" id="link" placeholder="">
<label class="sr-only" for="count">Count</label>
<input type="text" class="form-control mr-2" id="count" placeholder="">
</div>
</li>
<li class="list-group-item">
<div class="form-group form-inline mb-0">
<label for="description2">⋮⋮</label>
<input type="text" class="form-control ml-2 mr-2" id="description2" placeholder="">
<label class="sr-only" for="link2">Link</label>
<input type="text" class="form-control mr-2" id="link2" placeholder="">
<label class="sr-only" for="count2">Count</label>
<input type="text" class="form-control mr-2" id="count2" placeholder="">
</div>
</li>
<li class="list-group-item">⋮⋮</li>
<li class="list-group-item">4</li>
<li class="list-group-item">5</li>
<li class="list-group-item">6</li>
</ul>
</form>
</div>
</div>
</div>
Anyway, thanks in advance for any help or insight you can provide.
This worked for me. You may want to put the inline styles in your css file.
<div class="container">
<div id="cardBody" class="card-body">
<div class="row">
<div class="container-fluid d-flex">
<div class="col-md-7">
<label class="control-label ml-4">Description</label>
</div>
<div class="col-md-4">
<label class="control-label">Link</label>
</div>
<div class="col-md-1">
<label class="control-label">Count</label>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<form>
<ul id="itemList" class="list-group">
<li class="list-group-item">
<div class="row">
<div class="col-7 form-group form-inline mb-0">
<div class="d-flex" style="width: 100%;">
<label for="description">⋮⋮</label>
<input type="text" class="form-control ml-2" id="description" placeholder="" style="width: 100%;">
</div>
</div>
<div class="col-4 form-group form-inline mb-0" style="width: 100%;">
<input type="text" class="form-control mr-2" id="link" placeholder="" style="width: 100%;">
</div>
<div class="col-1 form-group form-inline mb-0" style="width: 100%;">
<input type="text" class="form-control mr-2" id="count" placeholder="" style="width: 100%;">
</div>
</div>
</li>
<li class="list-group-item">
<div class="row">
<div class="col-7 form-group form-inline mb-0">
<div class="d-flex" style="width: 100%;">
<label for="description">2</label>
<input type="text" class="form-control ml-2" id="description" placeholder="" style="width: 100%;">
</div>
</div>
<div class="col-4 form-group form-inline mb-0" style="width: 100%;">
<input type="text" class="form-control mr-2" id="link" placeholder="" style="width: 100%;">
</div>
<div class="col-1 form-group form-inline mb-0" style="width: 100%;">
<input type="text" class="form-control mr-2" id="count" placeholder="" style="width: 100%;">
</div>
</div>
</li>
<li class="list-group-item">
<div class="row">
<div class="col-7 form-group form-inline mb-0">
<div class="d-flex" style="width: 100%;">
<label for="description">3</label>
<input type="text" class="form-control ml-2" id="description" placeholder="" style="width: 100%;">
</div>
</div>
<div class="col-4 form-group form-inline mb-0" style="width: 100%;">
<input type="text" class="form-control mr-2" id="link" placeholder="" style="width: 100%;">
</div>
<div class="col-1 form-group form-inline mb-0" style="width: 100%;">
<input type="text" class="form-control mr-2" id="count" placeholder="" style="width: 100%;">
</div>
</div>
</li>
<li class="list-group-item">
<div class="row">
<div class="col-7 form-group form-inline mb-0">
<div class="d-flex" style="width: 100%;">
<label for="description">4</label>
<input type="text" class="form-control ml-2" id="description" placeholder="" style="width: 100%;">
</div>
</div>
<div class="col-4 form-group form-inline mb-0" style="width: 100%;">
<input type="text" class="form-control mr-2" id="link" placeholder="" style="width: 100%;">
</div>
<div class="col-1 form-group form-inline mb-0" style="width: 100%;">
<input type="text" class="form-control mr-2" id="count" placeholder="" style="width: 100%;">
</div>
</div>
</li>
<li class="list-group-item">
<div class="row">
<div class="col-7 form-group form-inline mb-0">
<div class="d-flex" style="width: 100%;">
<label for="description">5</label>
<input type="text" class="form-control ml-2" id="description" placeholder="" style="width: 100%;">
</div>
</div>
<div class="col-4 form-group form-inline mb-0" style="width: 100%;">
<input type="text" class="form-control mr-2" id="link" placeholder="" style="width: 100%;">
</div>
<div class="col-1 form-group form-inline mb-0" style="width: 100%;">
<input type="text" class="form-control mr-2" id="count" placeholder="" style="width: 100%;">
</div>
</div>
</li>
</ul>
</form>
</div>
</div>
</div>
</div>

The Modal Opens up incorrectly at start

There's an issue in my modal view in the html page. It happens each time when I load the page. The Modal always starts from the bottom of the html page. But only happens one time in each load. How do I resolve this. What am I doing wrong. Help would be appreciated.
Here's my html
<div class="form-group">
<div class="col-lg-12 co-md-9">
<div class="row">
<table id="basic-datatables" class="table table-bordered table-hover" cellspacing="0" width="100">
<thead style="text-align:match-parent">
<tr>
<th rowspan="1" colspan="1" style="width:100px">
<a href="javascript:void(0)" class="table-links" ng-click="sortType='Name'; sortReverse=!sortReverse">
<span ng-show="sortType != 'Name'" class="fa fa-unsorted"></span>
<span ng-show="sortType == 'Name' && !sortReverse" class="fa fa-sort-asc"></span>
<span ng-show="sortType == 'Name' && sortReverse" class="fa fa-sort-desc"></span> Customer Name
</a>
</th>
<th rowspan="1" colspan="1" style="width:100px">Email</th>
<th rowspan="1" colspan="1" style="width:100px">Mobile</th>
<th rowspan="1" colspan="1" style="width:100px">Company</th>
<th style="width:50px">Actions</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="customer in filteredDetails = (customerDetails | filter : Search | orderBy:sortType:sortReverse | limitTo: itemsPerPage: (currentPage - 1) * itemsPerPage)" style="text-align:match-parent">
<td>{{customer.Name}}</td>
<td>{{customer.Email}}</td>
<td>{{customer.Telephone}}</td>
<td>{{customer.Company}}</td>
<td style="text-align:center">
<span class="glyphicon glyphicon-edit"></span>
<span class="glyphicon glyphicon-trash"></span>
</td>
</tr>
</tbody>
</table>
<div ng-show="filteredDetails.length==0">
No results found.
</div>
<div class="row">
<div class="col-md-8 col-xs-12">
<uib-pagination total-items="totalCustomers" ng-model="currentPage" ng-change="pageChanged()" max-size="maxSize" boundary-links="true" class="pagination" items-per-page="itemsPerPage"></uib-pagination>
</div>
</div>
<!--Modal: edit-->
<div id="cusEditModal" class="modal fade modal-style2 in" data-backdrop="static" data-keyboard="false" role="dialog" tabindex="-1" style="position:center" aria-labelledby="myModalLabel">
<div class="modal-dialog modal-dialog-center" style="width:700px" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true" class="fa fa-times-circle-o"></span></button>
<h4 class="modal-title"><i class="round round-lg grey"><span class="icons8-create-new s20"></span></i> Edit Customer Details</h4>
</div>
<div class="modal-body">
<div class="form-group">
<label class="col-lg-2 col-md-3 control-label" for="">Customer Id</label>
<div class="col-lg-10 col-md-9">
<input type="text" class="form-control" name="cid" ng-model="modalEditDetails.Id" disabled />
</div>
</div>
<div class="form-group">
<label class="col-lg-2 col-md-3 control-label" for="">Name</label>
<div class="col-lg-10 col-md-9">
<input type="text" class="form-control" name="cname" ng-model="modalEditDetails.Name" />
</div>
</div>
<div class="form-group">
<label class="col-lg-2 col-md-3 control-label" for="">Email</label>
<div class="col-lg-10 col-md-9">
<input type="text" class="form-control" name="cemail" ng-model="modalEditDetails.Email" />
</div>
</div>
<div class="form-group">
<label class="col-lg-2 col-md-3 control-label" for="">Telephone</label>
<div class="col-lg-10 col-md-9">
<input type="text" class="form-control" name="ctel" ng-model="modalEditDetails.Telephone" />
</div>
</div>
<div class="form-group">
<label class="col-lg-2 col-md-3 control-label" for="">Company</label>
<div class="col-lg-10 col-md-9">
<input type="text" class="form-control" name="cid" ng-model="modalEditDetails.Company" />
</div>
</div>
</div>
<div class="modal-footer">
<button class="btn btn-default mr5 mb10" data-dismiss="modal" type="button">Close</button>
<button class="btn btn-warning mr5 mb10" type="button" ng-click="EditCustomer()">Edit</button>
</div>
</div>
</div>
</div>
<!--Modal .End-->
</div>
</div>
</div>
This is the screenshot when I load the page and open the modal when the row is clicked.
Renders correctly when I close and reopen the modal.
Added the editDetails function
$scope.editDetails = function(details) {
$scope.modalEditDetails = details;
$("#cusEditModal").modal("show");
}
})();
Leaving this here in case it helps anyone else.
Bootstrap modals have options to animate their opening. In your case you had the "fade" and "in" classes which enable this option. Changing/removing any of those should help. This might be due to how the js doesn't properly figure out modal height at the time of DOM insertion and they place it too far down.

div tags doesn't remain fixed if page is zoomed in or zoomed out

I have a bootstrap template html code:
<section id="main-content">
<section class="wrapper">
<h3><i class="fa fa-angle-right"></i>Create New Space Marine Chapter</h3>
<div class="row mt" >
<div class="col-md-12" >
<div class="content-panel" >
<form class="form-inline" action="add.php" method="POST">
<div class="row">
<div class="form-group col-lg-5" style='float:initial;width:680px;height:240px'>
<div class="form-group col-lg-4">
<label for="id">ID:</label>
<input class="form-control" type="text" name="ID" required="required" />
</div>
<div class="form-group col-lg-4">
<label for="name">Name:</label>
<input class="form-control" type="text" name="Name" required="required"/>
</div>
<div class="form-group col-lg-4">
<label for="founding">Founding:</label>
<input class="form-control" type="text" name="Founding" required="required"/>
</div>
<div class="form-group col-lg-4">
<label for="successor_of">Successor Of:</label>
<input class="form-control" type="text" name="Successor_Of" required="required"/>
</div>
<div class="form-group col-lg-4">
<label for="successor_chapters">Successor Chapters:</label>
<input class="form-control" type="text" name="Successor_Chapters" required="required"/>
</div>
<div class="form-group col-lg-4">
<label for="number">Number:</label>
<input class="form-control" type="text" name="Number" required="required"/>
</div>
<div class="form-group col-lg-4">
<label for="primarch">Primarch:</label>
<input class="form-control" type="text" name="Primarch" required="required"/>
</div>
<div class="form-group col-lg-4">
<label for="chapter_master">Chapter Master:</label>
<input class="form-control" type="text" name="Chapter_Master" required="required"/>
</div>
<div class="form-group col-lg-4">
<label for="homeworld">Homeworld:</label>
<input class="form-control" type="text" name="Homeworld" required="required"/>
</div>
<div class="form-group col-lg-4">
<label for="allegiance">Allegiance:</label>
<input class="form-control" type="text" name="Allegiance" required="required"/>
</div>
<div class="form-group col-lg-4">
<label for="colors">Colors:</label>
<input class="form-control" type="text" name="Colors" required="required"/>
</div>
</div>
</div>
<br>
<div class="form-group col-md-1 ">
<button onclick="showAddRecordDiv()" type="submit" class="btn btn-default">Create</button>
</div>
</form>
<form action="javascript:getLastRecord();" method="GET">
<div class="form-group col-md-2">
<button type="submit" class="btn btn-default">Show Last Created</button>
</div>
</form>
<form action="javascript:getAllRecords();" method="GET">
<div class="form-group col-lg-1">
<button type="submit" class="btn btn-default">Show All</button>
</div>
</form>
<table id="advanced-table" class="table table-striped table-advance table-hover">
<thead>
<tr>
<th style="text-align:center" width="50">ID</th>
<th style="text-align:center" width="100">Name</th>
<th style="text-align:center" >Founding</th>
<th style="text-align:center" width="150">Successor Of</th>
<th style="text-align:center" width="200" >Successor Chapters</th>
<th style="text-align:center" >Number</th>
<th style="text-align:center" >Primarch</th>
<th style="text-align:center" width="200" >Chapter Master</th>
<th style="text-align:center" >Homeworld</th>
<th style="text-align:center" >Allegiance</th>
<th style="text-align:center" >Colors</th>
<th style="text-align:center" width="100" >Input Date</th>
<th style="text-align:center" >Delete</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
<div id="alert-div" class="alert alert-danger" hidden="hidden">
<strong>RECORD DELETED</strong>
</div>
<div id="add-record-div" class="alert alert-success" hidden="hidden">
<strong>CHAPTER CREATED</strong>
</div>
</div><!-- /content-panel -->
</div><!-- /col-md-12 -->
</div><!-- /row -->
</section><! --/wrapper -->
</section><!-- /MAIN CONTENT -->
My problem is when I zoom in or out the page, all divs' positions changes and page's layout brakes. Here is some examples:
Page with size of 33%:
Page with size of 100%:
Page with size of 175%:
I searched over internet and saw that I must set divs' sizes fixed/static. I did something with float and width-height but it didn't help. What can I do for not to break page's layout?

AngularJS Grunt Dist HTML "Cannot read property 'length' of undefined Used --force, continuing"

Hi I have an AngularJS aplication created using Grunt bower and yeoman.
I am trying do grunt serve:dist on the application. While minifying some HTML shows error and doesn't minifying even if I do --force
I have some HTML pages in my views.
application.html
<!-- build:js scripts/applicationctrl.js -->
<script src="scripts/controllers/appln.js"></script>
<!-- endbuild -->
<div ng-if="view" id="application"
class="tab-pane active">
<div class="box-header blue-background">
<div class="title">
<div class="icon-edit"></div>
Application Information
</div>
</div>
<form class="form form-horizontal " id="appForm" name="appForm"
ng-submit="saveapplication()" ng-if="update"
style="margin-top: 1%">
<div ng-if="statusMessage!=null"
class="alert {{alertType}} alert-dismissable">
<a class="close" data-dismiss="alert" href="">× </a> <i
class="{{statusIcon}}"></i> {{statusMessage}}
</div>
<div class="groupedColumns"
ng-if="allowed">
<div class="col-sm-6">
<div class="form-group">
<label class="control-label col-sm-4 " for="applicationName">Application
: <span class="required">*</span>
</label>
<div class="col-xs-7 controls">
<input class="form-control input-sm inline-block"
data-rule-required="true" ng-model="application.name"
placeholder="Application Name" required="required" />
</div>
<div class="availability-result">
<i id="loading" class="{{spinnerClass}}"></i> <span
class="{{msgClass}}"></span>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-4 " for="applicationID">Application
ID : </label>
<div class="col-xs-7 controls">
<input class="form-control input-sm"
ng-model="application.applicationId" id="applicationID"
name="applicationID" placeholder="Application ID" />
</div>
</div>
</div>
</div>
</div>
</div>
I have another file in the same views folder.
info.html
<!-- build:js scripts/infoctrl.js -->
<script src="scripts/controllers/info.js"></script>
<!-- endbuild -->
<div class="box bordered-box" ng-if="tabpage.enable">
<div class="box-content box-no-padding">
<div class="responsive-table">
<div class="box-header">
<div class="title icon-truck">Summary</div>
</div>
<div class="form-group col-sm-6 no-margin-bottom">
<label
class="control-label col-sm-5 col-xs-12 input-sm-attr no-padding">Active
: </label>
<div>
<input class"no-padding" type="checkbox" ng-model="info.isActive"
ng-change="enablesave()">
</div>
</div>
<div class="col-xs-2 actions">
<button type="submit" id="infoSaveID"
ng-disabled="savebutton.enable" value="Save"
ng-click="saveInfo()"
class="btn btn-primary icon-ok icon-white">Save</button>
</div>
<div class="scrollable-area" style="padding-top: 5px;">
<table class="table-condensed table table-bordered table-hover">
<thead>
<tr>
<th class="col-size-reduce"
ng-repeat="(key ,value) in infoStatus[0]">{{key}}</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="row in infoStatus">
<td class="col-size-reduce" ng-repeat="(key, value) in row">
{{value}}</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
And I have many files too like this.
When I do grunt serve:dist it minifies the first html page. While it shows error while minifying the info.html page
Warning: dist/views/info.html
Parse Error: <input class"no-padding" type="checkbox" ng-model="info.isActive"
ng-change="enablesave()">
</div>
</div>
<div class="col-xs-2 actions">
<button type="submit" id="infoSaveID"
ng-disabled="savebutton.enable" value="Save"
ng-click="saveInfo()"
class="btn btn-primary icon-ok icon-white">Save</button>
</div>
<div class="scrollable-area" style="padding-top: 5px;">
<table class="table-condensed table table-bordered table-hover">
<thead>
<tr>
<th class="col-size-reduce"
ng-repeat="(key ,value) in infoStatus[0]">{{key}}</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="row in infoStatus">
<td class="col-size-reduce" ng-repeat="(key, value) in row">
{{value}}</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div> Used --force, continuing.
Warning: Cannot read property 'length' of undefined Used --force, continuing.
Why the first one is working fine and the second one shows error? How to solve it?
There is an error in your HTML syntax. At the first line, replace
<input class"no-padding" type="checkbox" ng-model="info.isActive"
ng-change="enablesave()">
By
<input class="no-padding" type="checkbox" ng-model="info.isActive"
ng-change="enablesave()">
And htmlmin will work properly.