Latest Posts
Sunday, June 26, 2016
In the previous blog post we got AngularJS to work with a module and a controller. However, we put everything in the global scope. The problem with that is that there are many JavaScript libraries that might be using the same variables as we are, or if we are working with other developers, there might be some unforeseen conflicts. The way we can mitigate this problem is to wrap our modules and controllers in an anonymous function. Think of an anonymous function as a wrapper or a container to hold our modules and controllers. Another term developers like to refer to anonymous function is an IIFE. Whatever it's called it's always good practice to avoid putting things in the global environment if it can be avoided.
Here are the steps to take the modules and controllers out of the global environment:
1. First let's wrap the module in an anonymous function. The source code for the app.js file should look like the following
The code above wraps the application in anonymous function and assigned to the variable call "app"
1. First let's wrap the module in an anonymous function. The source code for the app.js file should look like the following
(function(){
'use strict';
var app = angular.module('bankApp',['bankController']);
})();
The code above wraps the application in anonymous function and assigned to the variable call "app"
Saturday, June 25, 2016
The previous blog post we setup the AngularJS folder structure and pulled in the necessary dependencies using bower. In this post we are going to add AngularJS to our application. We will app an AngularJS application and controller to our simple banking application.
Here are the steps to setup AngularJS in our application.
1. Create an app.js file in the app/js folder, app.css in the app/css folder
Here are the steps to setup AngularJS in our application.
1. Create an app.js file in the app/js folder, app.css in the app/css folder
Bower is a JavaScript tool to get client dependencies in your project using npm packages.
The requirement for bower is that you need to install Node.js first. You can follow along in the this blog to install node.js, After node.js is installed open the command line and type the following command
npm install -g bower
The requirement for bower is that you need to install Node.js first. You can follow along in the this blog to install node.js, After node.js is installed open the command line and type the following command
npm install -g bower
Sunday, June 19, 2016
"Bootstrap is the most popular HTML, CSS, and JS Framework for developing responsive, mobile first projects on the web." - getbootstrap.com
Brief Introduction:
Bootstrap is a front-end framework using HTML, CSS and JavaScript to build menus, navigations, layouts, forms, tables, and etc. What is special about Bootstrap is that mobile-first, and responsive design is it's default behavior. Okay, hold on, let me put my professor's glasses on!
Okay class here goes:
Mobile-First Design: You design your site for mobile devices first so the desktop version is second class citizen.
Brief Introduction:
Bootstrap is a front-end framework using HTML, CSS and JavaScript to build menus, navigations, layouts, forms, tables, and etc. What is special about Bootstrap is that mobile-first, and responsive design is it's default behavior. Okay, hold on, let me put my professor's glasses on!
Okay class here goes:
Mobile-First Design: You design your site for mobile devices first so the desktop version is second class citizen.
Git is an open sourced version control system, that a lot of open source projects have a repository on.
To install Git on Windows follow the directions in this blog.
1. Go to http://www.git-scm.com
2. Click on "Download for Windows" if you are using Windows, or "Downloads" if you are using other OS. After you click on the button, save the download to a location on your desktop.
To install Git on Windows follow the directions in this blog.
1. Go to http://www.git-scm.com
2. Click on "Download for Windows" if you are using Windows, or "Downloads" if you are using other OS. After you click on the button, save the download to a location on your desktop.
Suppose you have an enum type like the one below, and you want to bind the enum type to a DropDownList control in a Web Forms application. How would you do this? There's an easy way to do this with just a few lines of code. You'll be amaze at how simple it is.
First of all here is our markup code in our .aspx page
First of all here is our markup code in our .aspx page
<%@ Page Language="C#" AutoEventWireup="true"
CodeBehind="Default.aspx.cs" Inherits="Sandbox.Default" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:DropDownList ID="DropDownList1" runat="server"></asp:DropDownList>
</div>
</form>
</body>
</html>
The GridView data grid control is probably the most popular and flexible data grid control in the ASP.NET arsenal. In this tutorial we will create a new GridView data grid on a web form.
Here are the steps:
1. Click on the "Design" tab in main window of Visual Studio
Here are the steps:
1. Click on the "Design" tab in main window of Visual Studio
string dobStr = ddlMonth.SelectedValue + "/" + txtDay.Text + "/" + txtYear.Text;
SqlParameter dob = new SqlParameter("DOB", Convert.ToDateTime(dobStr));
dob.SqlDbType = SqlDbType.Date;
cmd.Parameters.Add(dob);
Next: ASP.NET: Getting The Inserted ID Back With Scope_Identity()
padding: top right bottom left
padding:100px 75px 50px 25px;
Long hand version
padding-top:100px; padding-right:75px; padding-bottom:50px; padding-left:25px;
All four sides 100px
padding:100px;
In this blog we will get the current page file name that the user is currently on.
string[] currentUrl = HttpContext.Current.Request.Url.AbsolutePath.Split('/');
string pageFileName = currentUrl[currentUrl.Length-1];
Subscribe to:
Posts (Atom)
Search This Blog
Tags
Web Development
Linux
Javascript
DATA
CentOS
ASPNET
SQL Server
Cloud Computing
ASP.NET Core
ASP.NET MVC
SQL
Virtualization
AWS
Database
ADO.NET
AngularJS
C#
CSS
EC2
Iaas
System Administrator
Azure
Computer Programming
JQuery
Coding
ASP.NET MVC 5
Entity Framework Core
Web Design
Infrastructure
Networking
Visual Studio
Errors
T-SQL
Ubuntu
Stored Procedures
ACME Bank
Bootstrap
Computer Networking
Entity Framework
Load Balancer
MongoDB
NoSQL
Node.js
Oracle
VirtualBox
Container
Docker
Fedora
Java
Source Control
git
ExpressJS
MySQL
NuGet
Blogger
Blogging
Bower.js
Data Science
JSON
JavaEE
Web Api
DBMS
DevOps
HTML5
MVC
SPA
Storage
github
AJAX
Big Data
Design Pattern
Eclipse IDE
Elastic IP
GIMP
Graphics Design
Heroku
Linux Mint
Postman
R
SSL
Security
Visual Studio Code
ASP.NET MVC 4
CLI
Linux Commands
Powershell
Python
Server
Software Development
Subnets
Telerik
VPC
Windows Server 2016
angular-seed
font-awesome
log4net
servlets
tomcat
AWS CloudWatch
Active Directory
Angular
Blockchain
Collections
Compatibility
Cryptocurrency
DIgital Life
DNS
Downloads
Google Blogger
Google Chrome
Google Fonts
Hadoop
IAM
KnockoutJS
LINQ
Linux Performance
Logging
Mobile-First
Open Source
Prototype
R Programming
Responsive
Route 53
S3
SELinux
Software
Unix
View
Web Forms
WildFly
XML
cshtml
githu