I've been attempting to practice coding programs in Angular 2 using plnkr and jsfiddle. However, every time I try to run them, I encounter issues such as 404 errors or exceptions when I check the developer tools. Can anyone advise on the correct method for running Angular 2 applications in plnkr or jsfiddle?
Below are the links to the examples I have been referencing:
A simple Angular 2 program in jsfiddle
import {bootstrap} from 'angular2/platform/browser'
import {Component} from 'angular2/core';
@Component({
selector: 'my-app',
template: '<h1>My First Angular 2 App</h1>'
})
class AppComponent { }
Here are two plnkr examples: Plunkr1, plunkr2
Update:
When utilizing jsfiddle, I have selected Typescript + Angular 2 like this
https://i.sstatic.net/MkzXa.png
However, error messages still appear in the developer console:
https://i.sstatic.net/75J0e.png
The following are details of the errors:
angular2.js:3282 Uncaught ReferenceError: System is not defined
at angular2.js:3282
(anonymous) @ angular2.js:3282
angular2.dev.js:1 Failed to load resource: the server responded with a status of 404 ()
Rx.js:1 Failed to load resource: the server responded with a status of 404 ()
system.js:1 Failed to load resource: the server responded with a status of 404 ()
Rx.js:1 Failed to load resource: the server responded with a status of 404 ()
angular2.dev.js:1 Failed to load resource: the server responded with a status of 404 ()
require.js:8 Uncaught Error: Module name "angular2/platform/browser" has not been loaded yet for context: _. Use require([])
http://requirejs.org/docs/errors.html#notloaded
at G (require.js:8)
at Object.e [as require] (require.js:27)
at requirejs (require.js:33)
at eval (eval at exec (typescript.js:41), <anonymous>:9:17)
at exec (typescript.js:41)
at HTMLDocument.runScripts (typescript.js:41)