Skip to content

Instantly share code, notes, and snippets.

//http://www.siraj360.com/ng2/ :: A single page application developed with Angular 2 (beta) and Bootstrap 4 (alpha).
<div class="pos-f-t">
<div *ngIf="isShowMenu">
<div class="table-warning p-a-1 row">
<div class="container-fluid">
<button type="button" class="close" style="padding-right:15px;"
aria-label="Close"
(click)="isShowMenu = false">
<span aria-hidden="true">&times;</span>
//http://www.siraj360.com/ng2/ :: A single page application developed with Angular 2 (beta) and Bootstrap 4 (alpha).
import { Component } from 'angular2/core';
import { CORE_DIRECTIVES } from 'angular2/common';
import { RouterLink } from 'angular2/router';
@Component({
selector: 'header',
templateUrl: 'app/components/menu/header.component.html',
directives: [CORE_DIRECTIVES, RouterLink]
//http://www.siraj360.com/ng2/ :: A single page application developed with Angular 2 (beta) and Bootstrap 4 (alpha).
import { bootstrap } from 'angular2/platform/browser';
import { bind } from 'angular2/core';
import { FORM_PROVIDERS } from "angular2/common";
import { ROUTER_PROVIDERS, LocationStrategy, HashLocationStrategy } from 'angular2/router';
import { HTTP_PROVIDERS } from 'angular2/http';
import { AppComponent } from './components/app/app.component';
bootstrap(AppComponent, [
ROUTER_PROVIDERS,
@SirajGadhia
SirajGadhia / CoursesAdminController.js
Created November 23, 2015 21:30
AngularJS Controller Module (for Courses Admin ) - www.Siraj360.com/ng/
//http://www.siraj360.com/ng/ :: A sample single page application (SPA) developed with AngularJS 1.4.5 and Bootstrap 3.3.5.
(function () {
//debugger;
"use strict;"
angular.module('FD360').controller('CoursesAdminController',
['$scope', '$compile', '$modal', '$log', 'DataFactory', CoursesAdminController]
);
function CoursesAdminController($scope, $compile, $modal, $log, DataFactory) {
@SirajGadhia
SirajGadhia / CoursesAdminModalsController.js
Created November 23, 2015 21:20
AngularJS Controller Module (for Courses Admin Modals) - www.Siraj360.com/ng/
//http://www.siraj360.com/ng/ :: A sample single page application (SPA) developed with AngularJS 1.4.5 and Bootstrap 3.3.5.
(function () {
//debugger;
"use strict;"
// 1 - Delete Course
angular.module('FD360').controller('ModalDeleteCourseController',
['$scope', '$modalInstance', 'NoticeAndLogFactory', 'delete_course', ModalDeleteCourseController]);
function ModalDeleteCourseController($scope, $modalInstance, NoticeAndLogFactory, delete_course) {
@SirajGadhia
SirajGadhia / KPIController.js
Created November 23, 2015 20:39
AngularJS Controller Module (for KPI) - www.Siraj360.com/ng/
//http://www.siraj360.com/ng/ :: A sample single page application (SPA) developed with AngularJS 1.4.5 and Bootstrap 3.3.5.
(function () {
//debugger;
"use strict;"
//Defination
angular.module('FD360')
.controller('KPIController',
['$scope', 'DataFactory', KPIController]);
function KPIController($scope, DataFactory) {
@SirajGadhia
SirajGadhia / HomeController.js
Last active November 23, 2015 20:32
AngularJS Controller Module (for Home) - www.Siraj360.com/ng/
//http://www.siraj360.com/ng/ :: A sample single page application (SPA) developed with AngularJS 1.4.5 and Bootstrap 3.3.5.
(function () {
//debugger;
"use strict;"
//Defination
angular.module('FD360').controller('HomeController',
['NoticeAndLogFactory', 'DataFactory', HomeController]);
function HomeController(NoticeAndLogFactory, DataFactory) {
// debugger;
@SirajGadhia
SirajGadhia / Filter360.js
Created November 23, 2015 19:31
AngularJS Filter Module - www.Siraj360.com/ng/
//http://www.siraj360.com/ng/ :: A sample single page application (SPA) developed with AngularJS 1.4.5 and Bootstrap 3.3.5.
(function () {
//define filter module
angular.module('Filter360', []);
// 1 - Clculate %
angular.module('Filter360').filter('percentage', ['$filter', percentage]);
function percentage($filter) {
return function (input, decimals) {
//debugger;
@SirajGadhia
SirajGadhia / Directive360.js
Last active November 23, 2015 19:21
AngularJS Directive Module - www.Siraj360.com/ng/
//http://www.siraj360.com/ng/ :: A sample single page application (SPA) developed with AngularJS 1.4.5 and Bootstrap 3.3.5.
(function () {
//define directive module
angular.module('Directive360',
[]);
// 1 - Sorting Table
angular.module('Directive360').directive("ngSort360", ngSort360);
function ngSort360() {
return {
@SirajGadhia
SirajGadhia / FD360.js
Last active November 23, 2015 19:21
AngularJS Main Module - www.Siraj360.com/ng/
//http://www.siraj360.com/ng/ :: A sample single page application (SPA) developed with AngularJS 1.4.5 and Bootstrap 3.3.5.
(function () {
//define main module
angular.module('FD360', [
'ngRoute', 'ngAnimate', 'ngMessages', 'Filter360', 'Directive360', 'angularCharts', 'ui.bootstrap'
]);
//app config
angular.module('FD360').config(['$routeProvider', '$locationProvider', config360]);