Last active
January 21, 2016 23:53
-
-
Save jbasinger/3f1d1c4fc31cf189e1b6 to your computer and use it in GitHub Desktop.
Meetup 1/21/16 - Checkpoint 1
This file contains hidden or 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="editor"> | |
| <head> | |
| <link rel="stylesheet" href="bower_components/bootstrap/dist/css/bootstrap.css"/> | |
| <script src="bower_components/ace-builds/src-min-noconflict/ace.js"></script> | |
| <script src="bower_components/angular/angular.js"></script> | |
| <script src="bower_components/angular-ui-ace/ui-ace.js"></script> | |
| <script src="libs/ui-bootstrap-tpls-1.1.0.min.js"></script> | |
| <script src="browser_files/main.js"></script> | |
| <script src="bower_components/ace-builds/src-min-noconflict/mode-javascript.js"></script> | |
| <script src="bower_components/ace-builds/src-min-noconflict/mode-html.js"></script> | |
| <script> | |
| var AceModes = { | |
| JavaScript: ace.require('ace/mode/javascript').Mode, | |
| HTML: ace.require('ace/mode/html').Mode | |
| }; | |
| </script> | |
| <style> | |
| .ace_editor{ | |
| height: 550px; | |
| } | |
| </style> | |
| </head> | |
| <body ng-controller="main"> | |
| <nav class="navbar nav-default"> | |
| <div class="container-fluid"> | |
| <button type="button" class="btn btn-default navbar-btn" ng-click="newFile()">New</button> | |
| </div> | |
| </nav> | |
| <uib-tabset> | |
| <uib-tab ng-repeat="tab in tabs" | |
| heading="{{tab.filename}}" | |
| active="tab.active" | |
| disabled="tab.disabled"> | |
| <div ui-ace ng-model="tab.data"></div> | |
| </uib-tab> | |
| </uib-tabset> | |
| </body> | |
| </html> |
This file contains hidden or 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 app = angular.module('editor',['ui.bootstrap','ui.ace']); | |
| app.controller('main',function($scope){ | |
| $scope.tabs = []; | |
| $scope.newFile = function(){ | |
| $scope.tabs.push({ | |
| filename:"untitled", | |
| data: "", | |
| active: true | |
| }); | |
| } | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment