Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8982741
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T20:39:21+00:00 2026-06-15T20:39:21+00:00

I am new to dart. I trying to build the web-ui example on Seth

  • 0

I am new to dart.

I trying to build the web-ui example on Seth Ladd’s blog. I have created a new application.

My html looks like this:

<!DOCTYPE html>
<html> 

  <head> 
    <meta charset="utf-8"> 
    <title>Proefje</title> 
    <link rel="stylesheet" href="Proefje.css"> 
  </head> 

  <body> 

    <h1>Hello MDV</h1> 
    <p>MDV is {{superlative}}</p> 
    <button id="change-it" on-click="changeIt()">Change</button> 

    <script type="application/dart" src="Proefje.dart"></script> 
    <script src="https://dart.googlecode.com/svn/branches/bleeding_edge/dart/client/dart.js"></script> 
  </body> 
</html>

And the dart code like this:

import 'dart:math';
import 'dart:html'; 
import 'package:web_ui/web_ui.dart'; // not sure about this line

String superlative; 
List<String> alternatives = const ['wicked cool', 'sweet', 'fantastic']; 
Random random; 

main() { 
  superlative = 'awesome'; 
  random = new Random(); 
  query('#change-it').text = 'Do Change'; 
} 

changeIt() => superlative = alternatives[random.nextInt(alternatives.length)];

And my pubspec.yaml

name:  Proefje
description:  A sample application 

dependencies:   
  web_ui: any

When I run the app I see the query function changing the text in the button, but the MDV is {{superlative}} is left as is.

Any ideas?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T20:39:22+00:00Added an answer on June 15, 2026 at 8:39 pm

    You need to compile your html as described in the Setup section of Seth Ladd’s blog.

    If you’re new to Dart Web Components, you might want to read my Your First Web Component with Dart post, or the Dart Web Components article. Just like Dart Web Components, for MDV to work you need to get the web_components package, which contains the dwc compiler. The compiler is what converts the MVC and WC code into vanilla Dart and HTML.

    Basically you can add a build.dart in your root directory with somthing like :

    import 'package:web_ui/component_build.dart';
    import 'dart:io';
    
    void main() {
      build(new Options().arguments, ['web/App.html']);
    }
    

    (see Tools for Web UI )

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

New to wordpress and web design in general. I'm trying to setup a website
New-style status messages (as in mobile apps and web interface) have new properties e.g.
I'm trying to load a dart script dynamically using dart. I'm using something like
New to linux and trying to escape doing this the hard way. I have
I've been trying to setup a simple Serversocket and I would like to have
I'm playing with Dart, and I'm trying to create a new TableElement with a
I have this Google Dart test program: #import('dart:io'); main() { var s = new
New to iPhone app development, I have a problem compiling (or Build and Run)
I'm new to dart, and trying to use dart to write a hello world
I am new to DART. I read the language overview and checked example code

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.