Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

How to pass variables from one page to another with AngularJS

<a ng-model="parameter" ng-init="parameter = 'parameterA'" href="pageA.html?parameter=parameterA">Page A1</a> 

//pageA.html:

   var query = window.location.search.substring(1);
   var parts = query.split("=");
   var parameter = parts[1];
Comment

PREVIOUS NEXT
Code Example
Javascript :: count object based on status and shop using javascript 
Javascript :: Setting the default value in the drop down list in AngularJS 
Javascript :: angular create spec file for existing component 
Javascript :: angularjs how to get a response from a post request 
Javascript :: AngularJs: How to interpolate an interpolated string 
Javascript :: angularjs How to get time difference from ZoneDateTime in javascript 
Javascript :: angularjs getting Error: [$rootScope:inprog] $digest already in progress when changed from Fetch to $http + $q 
Javascript :: AngularJS stuck in module 
Javascript :: createaction ngrx example 
Javascript :: HTTP Get with looping password validation not working 
Javascript :: Edit parameter in variable with increment/decrement box and save it 
Javascript :: Get the childrens of an element in react native using useRef 
Javascript :: mutexify 
Javascript :: How to change a key value pair within a nested json structure C# 
Javascript :: How do I group values to an array for the same field value in jq 
Javascript :: yaml request body json 
Javascript :: filter number from string in javascript 
Javascript :: javascript scrolltoview vue 
Javascript :: Sending An AJAX Request Using Ky 
Javascript :: phaser wrap sprite 
Javascript :: string to date with ist javascript 
Javascript :: var a = x || y Variable Assignment In JavaScript 
Javascript :: querySelectorAll select multiple element types 
Javascript :: como hacer un contador de tiempo en javascript 
Javascript :: An Array Of Functions With Parameter 
Javascript :: jQuery mobile anchor link on the same page 
Javascript :: component rerendering when view port comes 
Javascript :: javascript variable scope in if statement 
Javascript :: convert milliseconds to seconds javascript 
Javascript :: react custum toogle 
ADD CONTENT
Topic
Content
Source link
Name
5+1 =