Permalink
Browse files

doc: m4d_content-Sample works

  • Loading branch information...
MikeMitterer committed Nov 21, 2018
1 parent 960f32b commit a6e98ef618dff22795d3a5a7e848b1d617f74ce8
@@ -1,2 +1,2 @@
WEB_DESCRIPTION="Material 4 Dart / Content"
WEB_PACKAGE="m4d_content"
WEB_DESCRIPTION="Material 4 Dart / SinglePage"
WEB_PACKAGE="m4d_spa"
@@ -1,7 +1,7 @@
# Material 4 Dart - Content / Include
# Material 4 Dart - SinglePage-Components

## Examples
> [GitHub](https://github.com/MikeMitterer/m4d_content)
> [GitHub](https://github.com/MikeMitterer/m4d_spa)


@@ -20,7 +20,7 @@
/// Support for doing something awesome.
///
/// More dartdocs go here.
library m4d_content;
library m4d_spa;

import 'dart:html' as dom;
import 'dart:async';
@@ -54,10 +54,10 @@ import 'package:m4d_router/router.dart';
//import 'services.dart' as service;


part "content/ViewFactory.dart";
part "content/MaterialContoller.dart";
part "content/components/MaterialContent.dart";
part "content/components/MaterialInclude.dart";
part "spa/ViewFactory.dart";
part "spa/MaterialContoller.dart";
part "spa/components/MaterialContent.dart";
part "spa/components/MaterialInclude.dart";

void registerContentComponents() {

@@ -17,7 +17,7 @@
* limitations under the License.
*/

part of m4d_content;
part of m4d_spa;

abstract class MaterialController {
/// [iocContainer] will be set after {ViewFactory} receives the {onLoadEnd} Event
@@ -17,7 +17,7 @@
* limitations under the License.
*/

part of m4d_content;
part of m4d_spa;

/**
* Loads additional "views" (html-Page) in SPA-Application
@@ -17,7 +17,7 @@
* limitations under the License.
*/

part of m4d_content;
part of m4d_spa;

/// MaterialContent is [ScopeAware] - this means that it can be found by child-MaterialComponent
/// looking for Data (like [MaterialRepeat]
@@ -16,7 +16,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
part of m4d_content;
part of m4d_spa;

class MaterialContentEvent{}

@@ -1,5 +1,5 @@
name: m4d_content
description: Material Design 4 Dart - Content / Include
name: m4d_spa
description: Material Design 4 Dart - SinglePage
version: 0.1.4
author: Mike Mitterer <office@mikemitterer.at>
homepage: https://github.com/MikeMitterer/m4d_content
@@ -9,11 +9,14 @@ environment:

dependencies:

m4d_content:
m4d_spa:
path: ../..

m4d_directive: '>=0.1.0 <1.0.0'
# path: /Volumes/Daten/DevLocal/DevDart/m4d/m4d_directive

m4d_components: '>=0.1.0 <1.0.0'
# path: /Volumes/Daten/DevLocal/DevDart/m4d/m4d_components
# path: /Volumes/Daten/DevLocal/DevDart/m4d/m4d_components

dev_dependencies:
build_runner: any
@@ -9,15 +9,14 @@ environment:

dependencies:

m4d_content:
m4d_spa:
path: ../..

m4d_components: '>=0.1.0 <1.0.0'
# path: /Volumes/Daten/DevLocal/DevDart/m4d/m4d_components

m4d_directive: '>=0.1.0 <1.0.0'
# path: /Volumes/Daten/DevLocal/DevDart/m4d/m4d_directive

m4d_components: '>=0.1.0 <1.0.0'
# path: /Volumes/Daten/DevLocal/DevDart/m4d/m4d_components

dev_dependencies:
build_runner: any
@@ -55,8 +55,10 @@
<div class="mdl-cell mdl-cell--2-col mdl-cell--hide-tablet mdl-cell--hide-phone"></div>
<div class="content mdl-color--white mdl-shadow--4dp content mdl-color-text--grey-800 mdl-cell mdl-cell--8-col">
<section class="demo-section demo-section--content">
<div class="menu">
<a href="#/test">Test</a> | <a href="#/test2">Test II</a> | <a href="#/slider">Slider</a> | <a href="#/error">Error</a>

<div class="menu">
<a href="#/test">Test</a> | <a href="#/test2">Test II</a> | <a href="#/slider">Slider</a> | <a
href="#/error">Error</a>
</div>
<p>If you click on error - check the console...</p>
<div class="demo-preview-block demo-content">
@@ -66,7 +68,8 @@
</div>

<div class="demo-preview-block">
<p>I am your main content - I live in index.html (SliderValue: |<span mdl-model="sliderValue">-</span>|)</p>
<p>I am your main content - I live in index.html (SliderValue: |<span
mdl-model="sliderValue">-</span>|)</p>
<p>
<input class="mdl-slider" type="range"
min="0" max="100" value="0" tabindex="0" id="mainslider1"/>
@@ -86,9 +89,11 @@
<input class="mdl-slider" type="range"
min="0" max="100" value="10" tabindex="0" disabled id="mainslider4"/>
</p>
<p>Try to drag the second slider. Click on <a href="#/slider">Slider</a> and you'll see how the dynamically loaded
slider.html reflects your changes in the main model! If the "Slider sample" is loaded drag one of the blue sliders.
They return their value to the main model and you'll see all three sliders moving.</p>
<p>Try to drag the second slider. Click on <a href="#/slider">Slider</a> and you'll see how the
dynamically loaded
slider.html reflects your changes in the main model! If the "Slider sample" is loaded drag
one of the blue sliders.
They return their value to the main model and you'll see all three sliders moving.</p>

<div class="cols">
<div class="col">
@@ -97,14 +102,14 @@ <h5 class="mdl-color-text--primary-dark">ListComponent</h5>
<m4d-list model="dyntest">
<template>
<li class="dynamic">
<span>RND value: {{value}}</span>
<button
id="list_btn{{index}}"
class="mdl-button mdl-button--raised mdl-button--colored mdl-ripple-effect"
data-mdl-click="onClick('{{index}}')"
>
Button #{{index}}
</button>
<span>RND value: {{value}}</span>
<button
id="list_btn{{index}}"
class="mdl-button mdl-button--raised mdl-button--colored mdl-ripple-effect"
data-mdl-click="onClick('{{index}}')"
>
Button #{{index}}
</button>
</li>
</template>
</m4d-list>
@@ -119,6 +124,7 @@ <h5 class="mdl-color-text--primary-dark">List</h5>
</div>
</div>


</section>
</div>
</div>
@@ -12,7 +12,7 @@ import 'package:m4d_core/services.dart' as coreService;

import 'package:m4d_components/m4d_components.dart';

import 'package:m4d_content/m4d_content.dart';
import 'package:m4d_spa/m4d_spa.dart';
import 'package:m4d_router/router.dart';

import 'package:m4d_content_sample/m4d_content_sample.dart';
@@ -9,11 +9,14 @@ environment:

dependencies:

m4d_content:
m4d_spa:
path: ../..

m4d_directive: '>=0.1.0 <1.0.0'
# path: /Volumes/Daten/DevLocal/DevDart/m4d/m4d_directive

m4d_components: '>=0.1.0 <1.0.0'
# path: /Volumes/Daten/DevLocal/DevDart/m4d/m4d_components
# path: /Volumes/Daten/DevLocal/DevDart/m4d/m4d_components

dev_dependencies:
build_runner: any

0 comments on commit a6e98ef

Please sign in to comment.