app.controller('ModalInstanceCtrl', function ($scope, $modalInstance, $http, guest) {
$scope.item = guest;
$scope.save = function () {
var req = {
method: 'POST',
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<SCRIPT language="JavaScript"> | |
window.data = { | |
'user_id':<?php echo Auth::user()->id ?>, | |
'article_id':<?php echo $article->id ?> | |
} | |
</SCRIPT> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The username and password for both databases is homestead / secret. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ng-init='company_item_code="{{$item->company_item_code}}"' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// register controller in html | |
<div data-ng-controller="myCtrl" data-ng-init="init()"></div> | |
// in controller | |
$scope.init = function () { | |
// check if there is query in url | |
// and fire search in case its value is not empty | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
debugger |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$http.get(url).success(function(data){ | |
$scope.data = data; // get row data | |
$scope.data.mydatefield = new Date($scope.data.mydatefield); // convert filed to date | |
}); | |
sample code | |
http://stackoverflow.com/questions/30537886/error-ngmodeldatefmt-expected-2015-05-29t190616-693209z-to-be-a-date-a |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.xx-dialog .modal-dialog { | |
width :90%; | |
min-width: 800px; | |
} | |
modalInstance = $modal.open({ | |
templateUrl: 'templates/editxxx.html', | |
controller: EditXXCtrl, | |
windowClass: 'xx-dialog', | |
resolve: { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$scope.modalOpen = function (_id) { | |
var modalInstance = $modal.open({ | |
animation: true, | |
templateUrl: 'myModalContent.html', | |
controller: 'ModalInstanceCtrl', | |
size: 'lg', | |
resolve: { | |
_id: function () { | |
return _id; |
OlderNewer