Skip to content

Instantly share code, notes, and snippets.

@disarticulate
Last active March 31, 2022 07:16
Show Gist options
  • Star 12 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save disarticulate/d06069ff3e71cf828e5329beab8cb084 to your computer and use it in GitHub Desktop.
Save disarticulate/d06069ff3e71cf828e5329beab8cb084 to your computer and use it in GitHub Desktop.
A notebook demonstrating how to use arbitrary frameworks (ie, AngularJS) within Jupyter Notebook
Display the source blob
Display the rendered blob
Raw
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
require.config({
paths: {
velocity: "https://cdn.jsdelivr.net/velocity/1.2.3/velocity.min",
interact: "https://cdn.jsdelivr.net/interact.js/1.2.6/interact.min",
angular: "https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.5.8/angular.min"
},
shim: {
'angular': {
exports: 'angular'
}
}
});
<div id="content" ng-controller="MyController">
<h1>{{greeting}},{{name}}</h1>
<input type="text" ng-model="greeting" name="name">
<input type="text" ng-model="name" name="name">
</div>
Copy link

ghost commented Jul 16, 2017

I did this with Angular 4:

screen shot 2017-07-16 at 1 04 47 pm

@sargense
Copy link

sargense commented Dec 15, 2017

I think
https://stackoverflow.com/questions/45330160/require-not-working-when-used-in-jupyter-ipython-notebook
is borrowing your code, and I'm not sure that it still works in current jupyter version. I also noticed that it doesn't run in jupyter.

@roemmele
Copy link

Thanks so much for this!

@mardambey
Copy link

@briancullinan can you share the Angular 4 version?

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