Angular JS in Seaside

This is rather simple and quick combination of the two of the cool technologies: Seaside and AngularJS

In a snap over few hours could code out this simple angular js integration and promises to be much more..

Seaside-Angular-Demo

Getting started:

I. Pharo-Seaside image:(Or plain Pharo 3.0 / 4.0 image, linked later for Teapot, takes longer to load)

In Pharo 3.0 Seaside.image workspace: download link

Gofer it
     url: 'http://smalltalkhub.com/mc/skrishnamachari/Seaside-Angular/main';
     configurationOf: 'SeasideAngularDemo';
     loadDevelopment.

     WAAdmin clearConfigurationCaches .  "Base Seaside image needs this.."

Start the Seaside Zn Adaptor from the Seaside Control Panel Or:

     ZnZincStaticServerAdaptor startOn: 8080 andServeFilesFrom: '.'.
Pharo 4.0 for now gives a Config load warning for ContextPart, ignore and proceed or pass on the fix if available
This serves the files in the css and js folder also from the base working directory of the Seaside launch.

Open:  http://localhost:8080/examples/angulardemo in a chrome / firefox browser and ie if you wish to..
*****************************
Extended Demo: Asynch REST request-response beta with Teapot within the same demo:

II. New Pharo 3.0 / 4.0 image workspace: download link

Gofer it
  url: 'http://smalltalkhub.com/mc/skrishnamachari/Seaside-Angular/main';
  configurationOf: 'TeapotApplication';
  loadDevelopment.

"Teapot start and run "
TeapotRequestHandler run
Open:  http://localhost:8080/examples/basicformdemo in a chrome / firefox browser and ie if you wish to..

Fill in the form and submit..
Advertisements

6 Responses to Angular JS in Seaside

  1. Going to try that out right away!

  2. skrishnamachari says:

    Obliged for a feedback..a bit manual steps to get around to.

    Local update done for making the Angular Library stick and the changes for angular 1.3.12.. Will synch repo later in the night along with a configuration if I can..

  3. Jan says:

    Thanks! Looking forward for an update!

  4. skrishnamachari says:

    Sorry for the confusion with a blank mcz for the seaside angular demo. Pharo MC bug in committing it.

    Now updated to Gofer script with all dependencies taken care of.

  5. I’ve it running and had a look around.

    Great.

    Now, how would one wire a callback to a controller reusing what is in an existing app?

    • skrishnamachari says:

      Nothing in this is Pharo in events / workflow hooks. Its Angular for all logics ..

      So for callbacks to controllers:
      * Angular is responsible for the callback automatically when it encounters the tag..
      * It typically has a $scope.funcName = function( … ) that allows a callback into that function if invoked from any webpage with the controller scope.

      I am sure there are more tricks than I know of in Angular that is to be markup constructed in this package I have created..

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: