I have a sample application which can store values into local storage when user clicks to local button but i want to all values from the txt file to be in local storage "note2": [] .
相关问题
- angularJS: ui-router equivalent to $location.searc
- Separate AngularJS Controllers Into Separate Files
- Angular ngAnimate not working first time on page l
- Ionic Spinner not showing up
- Upload file to Google Cloud Storage using AngularJ
相关文章
- Passing variable through URL with angular js
- Watch entire object (deep watch) with AngularJS
- Angular ng-if change span text
- Can ng-show directive be used with a delay
- AngularJS $routeParams vs $stateParams
- Multiple parameters in AngularJS $resource GET
- How to set class/style of accordion heading in Ang
- PUT to S3 with presigned url gives 403 error
To put your data in localStorage in angularJS you can use the library angular-localForage.
Example:
And yes i found a way to do so .,
you can use
ng-init='Function name'
here i use a function when a user click the to local button to push a value to local
but i want to store all the values from the txt file to local so i use
this function to call push function so that for every ng-repeat the value would push to local
Example :