Latest Posts
Showing posts with label angular-seed. Show all posts
Showing posts with label angular-seed. Show all 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
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