Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F102822243
branch1.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
Mon, Feb 24, 13:27
Size
943 B
Mime Type
text/x-java
Expires
Wed, Feb 26, 13:27 (2 d)
Engine
blob
Format
Raw Data
Handle
24433471
Attached To
R8244 Eawag_Swing_Weight_Elicitation
branch1.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-branch1',
templateUrl: './branch1.component.html',
styleUrls: ['./branch1.component.css']
})
export class Branch1Component implements OnInit {
constructor(private router: Router, public hl: Hl, private title: Title) { }
next(){
var itemOrder = $('#sortable').sortable("toArray");
// console.log(itemOrder);
// Save data to sessionStorage
sessionStorage.setItem('branch1', JSON.stringify(itemOrder));
// Get saved data from sessionStorage
//var data = sessionStorage.getItem('key');
this.router.navigateByUrl('/survey-v1/branch1/rate');
}
ngOnInit() {
this.title.setTitle('Survey v1');
$('#sortable').sortable();
}
}
Event Timeline
Log In to Comment