Skip to content

Instantly share code, notes, and snippets.

Angular

CLI Commands

Create new project

ng new <project-name>

Launch Application

The --open flag opens a browser to http://localhost:4200/.

ng serve --open
  • Installing Node
  • Installing grunt globally
  • Initializing a node app in local
  • Installing dev dependencies
  • Creating a grunt file
  • Configuring a local server (config, loading dependency, registering task)
  • Installing grunt-handlebars
  • Built-in Block Helpers (if/else, unless, each)
  • Installing grunt-watch
  • Partials

TYPESCRIPT

Installing typescript

npm install -g typescript

Transpile command

tsc ./filepath.ts

Watch file changes

Se debe agregar el atributo maxlength para los siguientes inputs con los valores abajo definidos:

<input tabindex="-1" id="enrollPhraseInput" class="alphanumeric" type="text" placeholder="Frase de seguridad" maxlength="20">
<input tabindex="-1" maxlength="30" id="enrollAnswerInput" class="alphanumeric no-space uppercase-message" placeholder="Respuesta" type="password">
<input tabindex="-1" maxlength="30" id="enrollConfirmationInput" class="alphanumeric no-space uppercase-message" placeholder="Confirmación" type="password">

GIT

Turn a directory into a git project

git init

Check the status of your changes

git status

Add a file to the staging area

###SMACSS ####Categories

  • Base are the defaults. They are almost exclusively single element selectors but it could include attribute selectors, pseudo-class selectors, child selectors or sibling selectors. Essentially, a base style says that wherever this element is on the page, it should look like this
  • Layout divide the page into sections. Layouts hold one or more modules together

##SASS SYNTAX ###INSTALL SASS

sudo gem install sass

###CHECK SASS VERSION

sass -v

####CONVERT SASS FILES TO CSS

###COMPILE LESS AND COPY

sudo grunt init 
sudo grunt ui
sudo /Library/StartupItems/VirtualBox/VirtualBox restart
```
# vi: set ft=ruby :
Vagrant::Config.run do |config|
config.vm.box = "ubuntu14"
config.vm.box_url = "https://cloud-images.ubuntu.com/vagrant/trusty/current/trusty-server-cloudimg-amd64-vagrant-disk1.box"
config.vm.forward_port 8000, 8000
config.vm.network :hostonly, "33.33.00.10"
# Used only in some rare cases
#config.vm.share_folder("vagrant-root", "/vagrant", ".", :extra => 'dmode=770,fmode=770', :nfs => true)