Skip to content

Instantly share code, notes, and snippets.



Last active Aug 29, 2015
What would you like to do?
Full Stack: Angular 101 Workshop (concepts)
<!doctype html>
<!-- exercise 1 -->
<!-- bootstraping an angular app -->
<html ng-app>
<script src=""></script>
<!-- exercise 2 -->
<!-- directive/binding basics -->
Name: <input type="text" ng-model="name" placeholder="Enter a name here">
<h1 ng-show="name">Ohai {{ name }}!</h1>
<!-- exercise 3 -->
<!-- more on directives -->
<span ng-init="people = [{name: 'Scott'},{name: 'Kevin'},{name: 'Micahel'}]"></span>
<h3> List of names </h1>
<li ng-repeat="person in people">
{{ }}

This comment has been minimized.

Copy link
Owner Author

@chantastic chantastic commented May 18, 2014

Yup, ng-init is a bad road to go down. But I think it's helpful when trying to teach directive-basics without having to first cover controllers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment