Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var term = new Terminal({
- cols: 80,
- rows: 24,
- screenKeys: true
- });
- term.open(document.body);
- term.write('x1b[31mWelcome to term.js!x1b[mrn');
- app.directive('terminal', function() {
- return {
- restrict: 'E',
- scope: {
- name: '@'
- },
- template: '<span>Hello {{name}}<div class="term"></div></span>',
- link: function(scope, elem, attrs) {
- var term = new Terminal({
- cols: 80,
- rows: 24,
- screenKeys: true
- });
- // window.w = elem;
- term.open(elem.find("div").get());
- term.write('x1b[31mWelcome to term.js!x1b[mrn');
- }
- }
- });
- <terminal name="Terminal 1"></terminal>
- TypeError: Cannot read property 'defaultView' of undefined
- at Terminal.open (http://localhost:4000/js/term.js:700:43)
- at link (http://localhost:4000/js/MyApp.js:23:18)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement