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
angular | |
.module('proj') | |
.config(config); | |
/** @ngInject */ | |
function config($logProvider, $httpProvider) { | |
// Enable log | |
$logProvider.debugEnabled(true); | |
// set default headers |
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
$rootScope.$on('stateChangeError', function(e) { | |
if (e typeof AuthError) { | |
$state.go('login'); | |
} | |
} |
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
angular-seed | |
ui-router-extras | |
angular-permission | |
//increase performance when making list of one time requests | |
$httpProvider.useApplyAsync() | |
$templateRequest | |
//chrome element scope debug |
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
(function() { | |
'use strict'; | |
angular | |
.module('uaMain') | |
.directive('essaysEdit', essaysEdit); | |
/** @ngInject */ | |
function essaysEdit($sce) { | |
var directive = { |
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
<form class="form-horizontal" name="videoForm" ng-submit="saveVideo()" novalidate> | |
<div class="modal-header"> | |
<h3 class="modal-title">Add Video</h3> | |
</div> | |
<div class="modal-body"> | |
<div class="form-group"> | |
<label class="col-sm-4 control-label">Video Title</label> | |
<div class="col-sm-6"> | |
<input type="text" ng-model="video.title" class="form-control" placeholder="Video Title" required> |
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
(function() { | |
'use strict'; | |
angular | |
.module('uaMain') | |
.factory('collegeModalService', collegeModalService); | |
/** @ngInject */ | |
function collegeModalService($http, $modal, URL, collegeService) { | |
return { |
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.openModal = function(video) { | |
var modalInstance = addVideoService.openAddVideoModal(video); | |
return modalInstance.result; | |
}; | |
$scope.addVideo = function() { | |
$scope.openModal(null).then(function(data) { | |
data.date_created = new Date(); | |
$scope.profile.videos.unshift(data); | |
}); |
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
(function() { | |
'use strict'; | |
angular | |
.module('uaMain') | |
.run(runBlock); | |
/** @ngInject */ | |
function runBlock($rootScope, $log, $state, bootstrap3ElementModifier, defaultErrorMessageResolver, validator, editableOptions) { | |
// Set $state visible for all scopes |
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
How to setup project locally | |
1. Clone project from github: git clone [email protected]:boo1ean/network.git | |
2. Go to project dir and run: ./composer.phar install | |
3. Set rw permissions for runtime folders: chmod 777 -R public/assets/ app/runtime/ | |
4. Add new site record to apache conf sudo gedit /etc/apache2/sites-available/network (will create new file if doesn't exist) And put: |
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
TypeScript enhances JavaScript with types, classes and interfaces. Some people think that is the problem with JavaScript. It’s not. The problem with JavaScript is not that it is a dynamically typed prototype based object-oriented language without classes. That is actually JavaScript’s strength. The problem is that it is a poorly designed language, filled with many hidden land mines awaiting the unsuspecting developer. |
OlderNewer