Using AngularJs in Worklight/PhoneGap application

Angular.js is a JavaScript MVC framework, that makes development of HTML applications easy. I wanted to figure out how to use it for developing Worklight application so i followed these steps to build simple Hello AngularJs application
  • First create a WorkLight application using WorkLight wizard, make sure that it works
  • Next make changes in the index.html or entry page of your application to include angular.js from Google CDN and also add <p>Hello {{'World'.length}}</p>
  • to test if AngularJs template is working
    
    <!DOCTYPE HTML>
    <html>
    <head>
     <meta charset="UTF-8">
     <title>HelloWorld</title>
     <meta name="viewport" content="width=device-width, 
    initial-scale=1.0, maximum-scale=1.0, 
    minimum-scale=1.0, user-scalable=0">
     <link rel="shortcut icon" href="images/favicon.png">
     <link rel="apple-touch-icon" href="images/apple-touch-icon.png">
     <link rel="stylesheet" href="css/HelloWorld.css">
     <script>window.$ = window.jQuery = WLJQ;</script>
    </head>
    <body id="content" style="display: none;" ng-app>
     <h1>Hello Angularjs</h1> 
     <p>Hello {{'World'.length}}</p>
     <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.0.6/angular.min.js" />
     <script src="js/initOptions.js"></script>
     <script src="js/HelloWorld.js"></script>
     <script src="js/messages.js"></script>
    </body>
    </html
    
After deployment you will notice that it prints Hello + length of 'world' which is 5 characters like this

206 comments:

«Oldest   ‹Older   201 – 206 of 206
codingpromasters said...

your blog is very nice.....

Appian is a low coding platform BPM (Business Process Management) tool that allows users and organizations to build the app by simple drag-and-drop options and helps automate complex business processes efficiently.

We at Coding Pro Masters provide the best Appian training to our students through our certified BPM trainers who have 7+ years of industry experience, real-time understanding of BPM apps, and have worked for multiple companies on Appian development.
appian cource in Hyderabad

GCP MASTERS said...

thanks for valuable info
gcp training in hyderabad

sidhardh said...

Im obliged for the blog article.Thanks Again. Awesome.
Selenium Training institute in kphb

Designyze said...

I highly recommend Designyze for businesses looking to improve their online presence. Their Digital Marketing Agency services help brands optimize campaigns, track conversions, and maximize returns on every marketing effort.

Designyze said...

Designyze combines expertise with technology to deliver results-driven marketing. Their Digital Marketing Agency approach ensures every campaign is data-backed, making it easy to increase ROI and grow your business online.

Chaitanya said...

I truly appreciate your efforts in sharing this. This website is fantastic, filled with a wealth of helpful and insightful information.

Windows Server Training from UK
PHP Developer Online Training from USA
Apache Spark Online Training
RPA Online Coaching from Canada
SAP Spartacus Online Course from Malaysia
Linux Administration Training Course In Hyderabad
IBM Cast Iron Training
SAP GRC 11g and 12c Training Institute In Bangalore
Intune MDM Training from Hyderabad

«Oldest ‹Older   201 – 206 of 206   Newer› Newest»