Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F122844040
branch2.component.ts
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Tue, Jul 22, 11:57
Size
938 B
Mime Type
text/x-java
Expires
Thu, Jul 24, 11:57 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
27578616
Attached To
R8244 Eawag_Swing_Weight_Elicitation
branch2.component.ts
View Options
import { Component, OnInit } from '@angular/core';
import 'jquery-ui/ui/widgets/sortable';
import * as $ from 'jquery';
import { Router } from '@angular/router';
import { Hl } from '../hl';
import { Title } from '@angular/platform-browser';
@Component({
selector: 'app-branch2',
templateUrl: './branch2.component.html',
styleUrls: ['./branch2.component.css']
})
export class Branch2Component implements OnInit {
constructor(private router: Router, public hl: Hl, private title: Title) { }
nextrate(){
var itemOrder = $('#sortable').sortable("toArray");
//console.log(itemOrder);
// Save data to sessionStorage
sessionStorage.setItem('branch2', JSON.stringify(itemOrder));
// Get saved data from sessionStorage
//var data = sessionStorage.getItem('key');
this.router.navigateByUrl('/survey-v2/branch2/rate');
}
ngOnInit() {
this.title.setTitle('Survey v2');
$('#sortable').sortable();
}
}
Event Timeline
Log In to Comment