Pitch your project

Random text


By admin Category Uncategorized, Posted February 7th, 2016
Setting up your AngularJS Workspace

Hi there,

In this blogpost I will show you how to setup an AngularJS WorkSpace.
Lets start!

First of all create a folder named WorkSpace. Open up your command line and type: cd "path to your WorkSpace folder"

Once you are there type: git init. After the init you have to clone the repository. To do that you have to go to your github and copy the link of the repository you just made. Now we can clone the repository by typing the command: git clone "repository url".

When you have the clone of your new repository you need to execute the following commands to connect your folder to your GitHub.

git config --global user.name <name>,
git config --global user.email <email>

Now create a html file like this name it index.html.

< !DOCTYPE html>
<html lang="en">
    <meta charset="UTF-8"/>
    <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.5/angular.min.js"></script>
    <div ng-app="myApp">
    <script src="js/myApp.js"></script>

And a JavaScript file like this name it myApp.js.

/* use strict */
var app = angular.module('myApp', []);
app.directive('test', function () {
    return {
        restrict: 'E',
        transclude: true,
        template: '<h2>Hello World</h2>'

This will execute like:

Executed code

Now you have created a new AngularJS WorkSpace.

Posted by Danny Suijker


Leave a Reply

Your email address will not be published. Required fields are marked *