Jump to content

Search the Community

Showing results for tags 'angularjs'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • W3Schools
    • General
    • Suggestions
    • Critiques
  • HTML Forums
    • HTML/XHTML
    • CSS
  • Browser Scripting
    • JavaScript
    • VBScript
  • Server Scripting
    • Web Servers
    • Version Control
    • SQL
    • ASP
    • PHP
    • .NET
    • ColdFusion
    • Java/JSP/J2EE
    • CGI
  • XML Forums
    • XML
    • XSLT/XSL-FO
    • Schema
    • Web Services
  • Multimedia
    • Multimedia
    • FLASH

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Languages

Found 4 results

  1. I have 3 files: html that is displaying data from json file using AngularJS, json file containing the data, script.js that stores the scripts. HTML file also has a form, from which I want to add data to my json file (onsubmit="insertData()"). insertData function is going to be in script.js I know, I may use .push method for this, but I don't know how to apply to the json file in this case. script.js var prg = angular.module('ajsprogram', []); prg.controller("outercont", function($scope, $http) { //function to display json file information $http.get('airlines.json').success(function(data){ $scope.info = data; $scope.airlineorder = 'airline'; }); }); function newairline(an,hb,ur,cs){ //new function to insert a data } airlines.json [ { "airline" : "British Airways", "hub" : "LHR", "url" : "http://britishairways.com", "callsign":"SPEEDBIRD" }, { "airline" : "Air France", "hub" : "CDG", "url" : "http://airfrance.com", "callsign":"AIRFRANS" }, { "airline" : "Virgin Atlantic", "hub" : "LGW", "url" : "http://virginatlantic.com", "callsign":"VIRGIN" }, { "airline" : "RyanAir", "hub" : "DUB", "url" : "http://ryanair.com", "callsign":"RYANAIR" }, { "airline" : "Emirates", "hub" : "DXB", "url" : "http://emirates.com", "callsign":"EMIRATES" } ]
  2. Mad_Griffith

    Custom filters

    Hello, I am learning Angular and I am trying to create a more complex filter that replaces BBCode with the html tags, which works like this: {{app.text|BBCode}} With no parameter, show the text with the BBCode converted to HTML tags. {{app.otherText|BBCode:remove}} If parameter "remove" is specified, then actually strip BBCode from text. I use both at the same time in my html. This is the simple code, but it doesn't work: the first IF is skipped. When I log 'isRemoved' it shows up as 'undefined' for all the occurrences of the expressions, including those with the 'remove' parameter specified. portfolio.filter('BBCode', function() { return function(input, isRemoved) { input = input || ''; var output; if (angular.isDefined(isRemoved) && angular.equals(isRemoved, 'remove')) { output = input.replace(/\[(.*?)\]/g, ''); } else { output = input.replace(/\[(.*?)\]/g, '<$1>'); } return output; }; }); Thank you for your help!
  3. some of the Angular examples don't work with current version (1.3.11) of angular.js the example at http://www.w3schools...y_ng_controller works fine until you change the version from 1.2.26 to 1.3.11 so changing the line <script src= "http://ajax.googleapis.com/ajax/libs/angularjs/1.2.26/angular.min.js"></script> to <script src= "http://ajax.googleapis.com/ajax/libs/angularjs/1.3.11/angular.min.js"></script> breaks the example. This also applies to other examples that use controllers.
  4. Im trying to create a form, first element should be a <select> tag with a few options and each of them will dynamically bring up a different set of forms depending on what the user chooses. The idea is within the select tag there will be different categories like cars, properties etc.. first user only sees that and when chose, it will bring up a set of input fields that required for that category. Anyone got an idea what would be the best way to do it in angular?
×