This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html ng-app="myApp"> | |
<head> | |
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.1.5/angular.min.js"></script> | |
<meta name="description" content="Test JS Bin" /> | |
<meta charset=utf-8 /> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
<div ng-controller="MainCtrl"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var addContact = document.querySelector("#add-contact"); | |
if (addContact) { | |
addContact.onclick = function () { | |
var newContact = new MozActivity({ | |
name: "new", // Possibly add-contact in future versions | |
data: { | |
type: "webcontacts/contact", | |
params: { // Will possibly move to be direct properties under "data" | |
givenName: "Robert", | |
lastName: "Nyman", |